Skip to content

Instantly share code, notes, and snippets.

View creativeaura's full-sized avatar
🌴
On vacation

Gaurav Jassal creativeaura

🌴
On vacation
View GitHub Profile
@nrollr
nrollr / ApacheHTTPSConfig.md
Last active March 11, 2024 13:32
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@honkskillet
honkskillet / byte-sizetuts.md
Last active June 18, 2022 14:18
A series of golang tutorials with youtube videos.
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@PaulKinlan
PaulKinlan / gist:4160675
Created November 28, 2012 11:46
Encapsulating Request Animation Frame
/*
Javascript is a funny thing.
Here are two things that will hit you with requestAnimationFrame
1) If you alias the window.requestAnimationFrame function on to anything other
than a window object, you get an Illegal Invocation Error.
You can solve this by using call() with the window object set.
@pbroschwitz
pbroschwitz / supplant.js
Created October 15, 2012 07:58
supplant - Crockford
/**
* supplant() does variable substitution on the string. It scans through the string looking for
* expressions enclosed in { } braces. If an expression is found, use it as a key on the object,
* and if the key has a string value or number value, it is substituted for the bracket expression
* and it repeats.
*
* Written by Douglas Crockford
* http://www.crockford.com/
*/
String.prototype.supplant = function (o) {
@sindresorhus
sindresorhus / jshint-options.md
Created July 31, 2012 14:43
JSHint options

My recommended JSHint options

JavaScript:

{
	node: true,
	browser: true,
	es5: true,
	esnext: true,
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@bkendzior
bkendzior / cookie_viewer.js
Created February 22, 2012 18:43
Javascript for viewing cookie:value pairs - great for mobile
@codemasta92
codemasta92 / gist:1555328
Created January 3, 2012 15:24
Button class with EaselJS
(function(k) {
var Button = function(a, x, y) {
this.initialize(a,x,y)
},p = Button.prototype = new DisplayObject;
p.left = 0;
p.top = 0;
p.ypos = 0;
p.image = null;
p.snapToPixel = true;
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt