Skip to content

Instantly share code, notes, and snippets.

View desyncr's full-sized avatar

DC* desyncr

View GitHub Profile
/*!
* 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 = {
@desyncr
desyncr / inittab
Last active June 21, 2016 11:51 — forked from jonjensen/kill-large-processes.pl
Small Perl script to monitor and kill processes that are using too much memory or CPU.
# Example inittab entry (/etc/inittab)
# this will create a daemonized process which init will watch and respawn as needed
1001::respawn:/usr/bin/perl /usr/local/bin/kill-large-processes.pl
# Function for starting browser in background
browser() { firefox "$@" & }
#--- Composer
# Fetching latest composer version.
alias getcomposer='curl -s https://getcomposer.org/installer | php'
# Fetching latest composer version if not available and run it.
#!/bin/sh
# This script will install a Git pre-push hook that prevents force pushing the master branch.
# Install in current Git repo:
# curl -fL https://gist.githubusercontent.com/stefansundin/d465f1e331fc5c632088/raw/install-pre-push.sh | sh
# Uninstall:
# rm .git/hooks/pre-push
# in each repository that you've added this to.
GITROOT=`git rev-parse --show-toplevel 2> /dev/null`
#!/usr/bin/env ruby
# NOTE! this is a work in progress. This is not tested or used regularly.
# Ensures we do not call destructive commands on protected branches.
#
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@desyncr
desyncr / insert-file
Created July 13, 2016 20:49 — forked from xor-freenet/insert-file
bash script to insert a file into Freenet (using FCP) (works on OS X)
#!/bin/bash
#
# GUID:F9FC4F74-501A-46BC-B57E-F9D8B4EFB83E
function client_hello() {
echo "ClientHello"
echo "Name=${1}"
echo "ExpectedVersion=2.0"
echo "EndMessage"
}
@desyncr
desyncr / AuthServiceProvider.php
Created September 27, 2016 19:57 — forked from gbuckingham89/AuthServiceProvider.php
Blog: Laravel Authentication Customer User Provider Demo
<?php
namespace App\Authentication;
use Auth;
use App\Authentication\UserProvider;
use Illuminate\Support\ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
@desyncr
desyncr / README
Created December 10, 2016 05:54
Notes on making a signed software release
Notes on making a signed software release
=========================================
Create a signed tag called NAME-VERSION with
git tag --message=NAME-VERSION --sign NAME-VERSION
Generate a release tar.gz and signature with
git archive --output=NAME-VERSION.tar.gz --prefix=NAME-VERSION/ NAME-VERSION
@desyncr
desyncr / release
Created December 10, 2016 16:59 — forked from foca/release
Small shell script to create GitHub releases from the command line
#!/usr/bin/env bash
set -e
[ -z "$DEBUG" ] || set -x;
usage() {
echo "$0 <repo> <tag> [<release name>] [-- <asset>...]" >&2;
}
if [ "$1" = "-h" -o "$1" = "--help" ]; then