Skip to content

Instantly share code, notes, and snippets.

View JoshuaEstes's full-sized avatar
👨‍💻

Joshua Estes JoshuaEstes

👨‍💻
View GitHub Profile
@onyxfish
onyxfish / fabfile.py
Created February 9, 2010 23:05
Chicago Tribune News Applications fabric deployment script
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function ($) {
$.event.special.textchange = {
@bpizzi
bpizzi / gist:669191
Created November 9, 2010 15:00
Nginx site conf for symfony 1.4
We couldn’t find that file to show.
//+------------------------------------------------------------------+
//| 1_Min_Micro_Trading.mq4 |
//| StarLimit Software Corps., |
//| starlimit04@yahoo.com |
//+------------------------------------------------------------------+
#property copyright "StarLimit Software Corps.,"
#property link "starlimit04@yahoo.com"
#property indicator_chart_window
@iangreenleaf
iangreenleaf / bitcoin_idle
Created June 2, 2011 02:04
Bitcoin mining when idle
#!/bin/bash
# Monitors for signals from gnome-screensaver and activates or deactivates
# bitcoin miners accordingly.
# Params to the mining programs are all hardcoded. Change 'em manually. Leave the "&"s.
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'" | \
while read line; do
case "$line" in
//+------------------------------------------------------------------+
//| LiveAlligator.mq4 |
//| Copyright © 2011, MetaQuotes Software Corp. |
//| http://www.mql4.com/ru/users/rustein |
//-------------------------------------------------------------------+
// Trend Detection function
#define BULL 1
#define BEAR 2
// Input variables
@jubianchi
jubianchi / sf2_standalone_form.php
Created August 25, 2011 07:31
How to use Symfony2 Form Component Standalone
<?php
namespace Standalone\Form;
use \Symfony\Component\HttpFoundation as SHttp;
use \Symfony\Component\Form as SForm;
use \Symfony\Component\DependencyInjection as SDI;
use \Symfony\Bridge as SBridge;
//Register all your autoload function here
//...
@lanwin
lanwin / add_users_to_projects.sh
Created February 2, 2012 08:41
Script to Automatically add all GitLab users to all projects
#!/bin/sh
baseurl=http://mygitlaburl
usermail=adminuser@mymailserver
userpass=adminpassword
repo_access=2 #0=denied 1=read 2=read&write
project_access=2 #0=deined 1=read 2=report 3=admin
# login
curl -s -I -c cookies.txt -d "utf8=✓&user[email]=$usermail&user[password]=$userpass&commit=Sign+in" $baseurl/users/sign_in
@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
);
@JoshuaEstes
JoshuaEstes / 000-Cheat-Sheets.md
Last active February 11, 2024 04:25
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.