Skip to content

Instantly share code, notes, and snippets.

@kyhau
kyhau / css_resources.md
Last active August 29, 2015 14:07 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@kyhau
kyhau / javascript_resources.md
Last active August 29, 2015 14:07 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@kyhau
kyhau / create_self_signed_cert.bat
Created February 28, 2016 03:19
Create/deploy self-signed certificates for code signing
@ECHO OFF
:: Possible bin path
:: Windows SDK
:: 10: C:\Program Files (x86)\Windows Kits\10\bin\x64
:: 8.1: C:\Program Files (x86)\Windows Kits\8.1\bin\x64
:: 8: C:\Program Files (x86)\Windows Kits\8.0\bin\x64
:: 7: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin
:: Visual Studio
:: 2015: C:\Program Files (x86)\Windows Kits\10\bin\x64
@kyhau
kyhau / random_dilbert.py
Created February 28, 2016 03:31
Random dilbert image url
"""
Dilbert
"""
import random
import urllib
import re
def random_dilbert(logger):
"""
Retrieve url of a random dilbert
@kyhau
kyhau / random_xkcd.py
Created February 28, 2016 03:35
Random xkcd image url
"""
xkcd
"""
import xkcd
def random_xkcd(logger):
"""
Retrieve url of a random xkcd
"""
@kyhau
kyhau / random_fortune_cow.py
Created February 28, 2016 03:37
Random fortune cow
"""
Fortune and cowsay
"""
import subprocess
def fortune_cow(logger):
"""
Run: fortune | cowsay -f $(ls /usr/share/cowsay/cows/ | shuf -n1)
"""
@kyhau
kyhau / hash_text.py
Created February 28, 2016 03:45
Hash a password (text) using bcrypt.hashpw with a random salt
import argparse
import bcrypt
def main():
"""
simple script to get a hashed password from text
"""
parser = argparse.ArgumentParser()
parser.add_argument('--text', required=True, help='input text')
@kyhau
kyhau / LetsEncryptNotes.md
Last active July 8, 2023 01:28
Create SSL certificates using Let's Encrypt
@kyhau
kyhau / SaltStackNotes.md
Last active December 12, 2016 00:41
SaltStack

Install salt-minion on a new ubuntu server

  1. Change the hostname on the minion
$ sudo su
  
$ vi /etc/hosts
# add 127.0.0.1 servername
 
@kyhau
kyhau / DockerUpgrade.md
Last active March 1, 2016 10:26
Docker Upgrade

Docker Upgrade

$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
 
$ sudo nano /etc/apt/sources.list.d/docker.list
------
# remove: deb https://get.docker.com/ubuntu docker main
# add:
deb https://apt.dockerproject.org/repo ubuntu-trusty main