Skip to content

Instantly share code, notes, and snippets.

@Iman
Iman / clean.sh
Last active May 19, 2024 14:03
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@mccabe615
mccabe615 / phpdangerousfuncs.md
Last active May 19, 2024 14:03
Dangerous PHP Functions

Command Execution

exec           - Returns last line of commands output
passthru       - Passes commands output directly to the browser
system         - Passes commands output directly to the browser and returns last line
shell_exec     - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen          - Opens read or write pipe to process of a command
proc_open      - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
@jareware
jareware / SCSS.md
Last active May 19, 2024 14:03
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@karpathy
karpathy / min-char-rnn.py
Last active May 19, 2024 14:00
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mbhutton
mbhutton / workflowy-find-popup.js
Last active May 19, 2024 14:00
Tampermonkey script for searching using a popup dialog, as an alternative to find-as-you-type
// ==UserScript==
// @name Workflowy: Search shortcut
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Workflowy customisations
// @author Matt Hutton
// @match https://workflowy.com*
// @grant none
// @run-at document-end
// ==/UserScript==
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 19, 2024 13:59
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@ausfestivus
ausfestivus / AzureRegionData.md
Last active May 19, 2024 13:59
A list of the Azure regions

List of Azure Regions

A list of all the region names and locations for Azure

Creating the list

You can recreate the list anytime using this command:

az account list-locations -o table
2070 Paradigm Shift Transcript
Transcribed by Edwin Finch
Sam, you're a legend. Enjoy
==============================
Whew.
Hey.
@VirtuosoChris
VirtuosoChris / HelloOpenVR_GLFW.cpp
Last active May 19, 2024 13:56
Minimal OpenVR + GLFW Example
/**** Minimal OpenVR example : outputs textures to the headset, a different color in each eye. No head tracking or input anywhere. Bare minimum. ****/
/// header only extension loader and object oriented bindings -- ref : https://github.com/VirtuosoChris/glhpp
#define GL_ALT_GL_API 1
#define GL_ALT_GLES_API 2
#include <glalt/gl4.5.h> // opengl api
#include <glalt/glext.h>
#include <opengl.hpp> // object oriented bindings
@adrianhajdin
adrianhajdin / demo_properties.csv
Created July 21, 2023 09:11
Build and Deploy a Fully Responsive App 10x Faster with AI | Next.js 13
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 2. in line 6.
name,image,price
Riverside Retreat in Sydney,https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1074&q=80,25000
New York Cozy Cottage,https://images.unsplash.com/photo-1555636222-cae831e670b3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1477&q=80,120000
Luxury Penthouse in Dubai Marina,https://images.unsplash.com/photo-1505843513577-22bb7d21e455?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1632&q=80,450000
Premium Home in Berlin,https://images.unsplash.com/photo-1560185009-dddeb820c7b7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80,357000
Seafront Home in Chicago,https://images.unsplash.com/photo-1635108201747-976f7d4ba453?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80,650000
Cozy Cottage,