Skip to content

Instantly share code, notes, and snippets.

AYF realazthat

Block or report user

Report or block realazthat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andrewrk
andrewrk / 3let.py
Created Feb 15, 2016
origin of the zig programming language name. https://github.com/andrewrk/zig/
View 3let.py
import string
import random
vowels = "aoeuiy"
def m():
c1 = vowels[random.randint(0,len(vowels)-1)]
c2 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
c3 = string.ascii_lowercase[random.randint(0,len(string.ascii_lowercase)-1)]
print('z' + c1 + c2 + c3)
m()
@domenic
domenic / auto-deploy.md
Last active Dec 1, 2019
Auto-deploying built products to gh-pages with Travis
View auto-deploy.md

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@moshekaplan
moshekaplan / cidr_to_ipv4
Last active Jan 1, 2016
CIDR to IPv4 converter. Thrown together for corelanc0d3r.
View cidr_to_ipv4
# CIDR to ipv4
# Written by Moshe Kaplan
def to_long(ip):
ip = ip.split('.', 4)
return int(ip[0])*(2**24) + int(ip[1])*(2**16) + int(ip[2])*(2**8) + int(ip[3])
def to_dotted_decimal(long_form):
octets = []
for i in range(4):
octets += [str(long_form % 2**8)]
View april-fools.css
/*
aprilFools.css
Written by Wes Bos
I assume no responsibility for angry co-workers or lost productivity
Put these CSS definitons into your co-workers Custom.css file.
They will be applied to every website they visit as well as their developer tools.
*/
@hhatto
hhatto / gist:4162611
Created Nov 28, 2012
print raw sql for peewee
View gist:4162611
from peewee import *
from models import News, database
compiler = database.get_compiler()
print(News.select().where(News.url == 'test').sql(compiler))
@gre
gre / easing.js
Last active Dec 7, 2019
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
View easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@louisremi
louisremi / animLoopX.js
Created Jul 29, 2011
Animation loop with requestAnimationFrame
View animLoopX.js
// Cross browser, backward compatible solution
(function( window, Date ) {
// feature testing
var raf = window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame;
window.animLoop = function( render, element ) {
var running, lastFrame = +new Date;
You can’t perform that action at this time.