This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# PHP CodeSniffer pre-receive hook for git | |
PHPCS_BIN="/usr/bin/phpcs" | |
PHPCS_CODING_STANDARD="PEAR" | |
# use coding standart dir from local repo | |
PHPCS_DIR_LOCAL=0 | |
TMP_DIR=$(mktemp -d --tmpdir phpcs-pre-receive-hook.XXXXXXXX) | |
mkdir "$TMP_DIR/source" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>jQuery.plugin.convertTableToScrollable test</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js"></script> | |
<script type="text/javascript" src="jQuery.plugin.convertTableToScrollable.js"></script> | |
<style type="text/css"> | |
table { | |
border-collapse: collapse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery plugin: add .serializeObject() method to jQuery | |
// at this moment (jQuery v1.7.2) where no such method in core | |
// this method serializes a form into an (arguably more useful) object | |
(function($,undefined) { | |
$.fn.serializeObject = function() { | |
var obj = {}; | |
$.each( this.serializeArray(), function(i,o) { | |
obj[o.name] = obj[o.name] === undefined ? o.value : | |
$.isArray( obj[o.name] ) ? obj[o.name].concat( o.value ) : | |
[ obj[o.name], o.value ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# ./perl_unused_subs.sh project_dir | |
# ./perl_unused_subs.sh project_dir another_project_dir_that_can_use_prev | |
# ACK_OPTIONS="-h" && ./perl_unused_subs.sh project_dir | |
INC_DIRS=$@ | |
TMP_FILE="$$.pl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Net::SMPP::Packet; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use List::Util qw/first/; | |
use base qw(Exporter); | |
our $VERSION = '0.01'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ash | |
echo "Updating package list..." | |
opkg update > /dev/null | |
if [ `opkg list-upgradable | cut -d " " -f1 | wc -l` -gt 0 ]; then | |
echo "Available updates:" | |
opkg list-upgradable | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ==================================================================================== | |
# Steps for Main Router (must have connected internet on WAN port) | |
# ==================================================================================== | |
# Set your network IP address configuration default is 192.168.1.0/24 | |
uci set network.lan.ipaddr='192.168.1.1' | |
# Recommended, to identify on network and when logged on | |
uci set system.@system[0].hostname='MainRouter' | |
uci set network.lan.hostname="`uci get system.@system[0].hostname`" |