Skip to content

Instantly share code, notes, and snippets.

View chrisevans's full-sized avatar
🎯
Trying random things that sound fun

Chris Evans chrisevans

🎯
Trying random things that sound fun
View GitHub Profile
@nijikokun
nijikokun / example-user.js
Created May 3, 2012 20:46
Beautiful Validation... Why have I never thought of this before?!
var user = {
validateCredentials: function (username, password) {
return (
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' }
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' }
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' }
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' }
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' }
: false
);
@sunliwen
sunliwen / init_nmp.py
Created September 17, 2011 17:53
Fabric install Nginx+PHP-FPM+MySQL on Ubuntu 10.04 LTS
def init_nmp():
install_nginx()
install_php()
install_phpfpm()
def install_nginx():
sudo("add-apt-repository ppa:nginx/stable")
sudo("apt-get update")
sudo("apt-get -y -q install nginx-full nginx-common")
@atk
atk / LICENSE.txt
Created July 29, 2011 20:08 — forked from 140bytes/LICENSE.txt
urlPath
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created July 16, 2011 14:07 — forked from 140bytes/LICENSE.txt
UTF8 encoder
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@atk
atk / LICENSE.txt
Created July 15, 2011 16:08 — forked from 140bytes/LICENSE.txt
basic js syntax highlighting
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alex Kloss <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@Kambfhase
Kambfhase / LICENSE.txt
Created July 4, 2011 09:45 — forked from 140bytes/LICENSE.txt
activity detection
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Kambfhase
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@ZeeAgency
ZeeAgency / LICENSE.txt
Created June 23, 2011 23:16 — forked from 140bytes/LICENSE.txt
dependency management
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@ste-lam
ste-lam / LICENSE.txt
Last active June 29, 2024 08:10 — forked from 140bytes/LICENSE.txt
base64 encoder w/padding
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@wrayal
wrayal / LICENSE.txt
Created May 26, 2011 22:36 — forked from 140bytes/LICENSE.txt
140 byte wraytracer
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@stagas
stagas / LICENSE.txt
Created May 26, 2011 06:58 — forked from 140bytes/LICENSE.txt
Padding for Strings and Numbers
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 George Stagas https://github.com/stagas
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE