Skip to content

Instantly share code, notes, and snippets.

View autoferrit's full-sized avatar

Shawn McElroy autoferrit

View GitHub Profile
@autoferrit
autoferrit / php password generator
Created March 13, 2012 20:16 — forked from bendo01/php password generator
php password generator
<?php
substr( str_shuffle( 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$' ) , 0 , 10 );
?>
@autoferrit
autoferrit / password.py
Created March 14, 2012 18:32 — forked from nigelbabu/password.py
Generate random password
#!/usr/bin/python
import string
from random import choice
print ''.join([choice(string.letters + string.digits + string.punctuation) for i
in range(15)])
@autoferrit
autoferrit / style_guide.md
Created August 23, 2012 05:17 — forked from dominictarr/style_guide.md
style guide

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

@autoferrit
autoferrit / test.php
Created April 27, 2016 20:46
testing php regex vs builtin
<?php
function test1( $string )
{
return strtoupper( $string[0] ) === $string[0];
}
function test2( $string )
{
return preg_match( '/^[A-Z]/', $string );
@autoferrit
autoferrit / .spacemacs
Last active October 12, 2016 16:57
spacemacs config
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
#|/bin/bash
#
# use:
# $ ./archify image.jpg [blurring] [logowidth]
# blurring is an integer from 0 (no) to 8 (thick greasy lens)
# logowidth is in pixels
#
bg=$1
blur=${2:-0}
logowidth=${3:-350}
# !/usr/bin/env python
from distutils.core import setup
setup(
name='package_name',
packages=['package_name'],
author='Audrey Roy Greenfeld',
author_email='aroy@alum.mit.edu',
url='https://github.com/audreyr/cookiecutter-pypackage',
)
@autoferrit
autoferrit / cloudSettings
Last active May 16, 2017 23:18
Visual Studio Code Sync Settings GIST
{"lastUpload":"2017-05-16T23:18:05.477Z","extensionVersion":"v2.7.0"}
@autoferrit
autoferrit / tmux-cheatsheet.markdown
Created November 15, 2017 17:42 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@autoferrit
autoferrit / myweechat.md
Created June 2, 2017 23:11 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf