Skip to content

Instantly share code, notes, and snippets.

View jujhars13's full-sized avatar

Jujhar Singh jujhars13

View GitHub Profile
@jujhars13
jujhars13 / acl.json
Created May 10, 2013 10:14
zend framework 1 acl using json config file
{
"resources": [
"error::error",
"auth::login",
"auth::logout",
"index::index",
"video::index"
],
"acl": {
"guest": [
# Ubuntu upstart file at /etc/init/yourservice.conf
pre-start script
mkdir -p /var/log/yourcompany/
end script
respawn
respawn limit 15 5
start on runlevel [2345]
@jujhars13
jujhars13 / git-commit.bat
Created January 4, 2013 11:16
Windows command line based git commit using message given by whatthtecommit.com you'll need curl and git on your path too. to run: git-commit.bat <your optional commit message to be prepended on>
rem 2013-01-04 [email protected]
rem will run git commit and add yoru message and then append it with some random text from whatthecommit.bat
rem you'll need CURL in your path
for /f "tokens=* delims= " %%a in ('curl -s http://whatthecommit.com/index.txt') do (
git commit --verbose -a -m "%1 %%a"
)
@jujhars13
jujhars13 / watch.bat
Created November 27, 2012 11:28
watch.bat - watch command for windows - drop this file on your path
rem Watch.bat - trying to emulate linux watch command on windows
rem inspired by http://stackoverflow.com/questions/6765554/is-there-a-windows-command-line-equivalent-to-linux-watch-command amd http://superuser.com/questions/191063/what-is-the-windows-analog-of-the-linux-watch-command
@echo off
title Watch %1 %2 %3 %4 %5
:loop
cls
%1 %2 %3 %4 %5
echo.
timeout /t 2
goto loop
@jujhars13
jujhars13 / git-merge-into.bat
Created October 12, 2012 08:28
Windows batch file for merging of branches INTO the specified branch.
@echo off
rem For git merging of branches into the branch you specify, for my covenience and possibly yours
rem created 2012-09-06 by [email protected]
rem *********
rem will get the current branch name, checkout the branch you specify and merge
rem the original branch into the specified branch, and check
rem *********
rem get the current branch name #http://stackoverflow.com/questions/6245570/get-current-branch-name
#!/bin/bash
# /etc/init.d/selenium-grid
# centos-compatible selenium-grid startup script.
# Eugene Zakharchenko <z.evgeniy[at]gmail.com>
### BEGIN INIT INFO
# Provides: selenium-grid
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6