This file contains hidden or 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
<?php | |
abstract class Base | |
{ | |
//An array of DB config values | |
protected static $config; | |
//Path to configuration | |
protected static $iniPath = 'C:\Users\winuser\Desktop\dbconfig.ini'; | |
} |
This file contains hidden or 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
/** | |
* finds the intersection of | |
* two arrays in a simple fashion. | |
* | |
* PARAMS | |
* @param a - first array, must already be sorted | |
* @param b - second array, must already be sorted | |
* | |
* NOTES | |
* |
This file contains hidden or 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
git config --global core.editor vim | |
git config --global color.ui true | |
git config --global color.diff.meta "blue black bold" |
This file contains hidden or 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> | |
<head> | |
<script src="http://ajax.microsoft.com/ajax/jQuery/jquery-1.9.1.min.js"></script> | |
<script src="modal.js"></script> | |
<style type="text/css"> | |
#mask{ | |
position:absolute; /* important */ | |
top:0px; /* start from top */ | |
left:0px; /* start from left */ | |
height:100%; /* cover the whole page */ |
This file contains hidden or 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
<script type="text/javascript"> | |
function listen_for_uncheck_all($checkboxes) | |
{ | |
jQuery('#uncheckalllink').unbind('click').bind('click', function(){ | |
$checkboxes.removeAttr("checked"); | |
jQuery('#uncheckalllink').html('Check All'); | |
listen_for_check_all($checkboxes); |
This file contains hidden or 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
<script type="text/javascript"> | |
function getPage(id) | |
{ | |
id = prompt('Enter ID: '); | |
window.location.href='http://domain.com/module/action?id=' + id; | |
return false; | |
} | |
</script> |
This file contains hidden or 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
mkdir prj1 | |
cd prj1 | |
git init | |
touch README | |
git add . | |
git commit -m "Added blank readme" | |
git remote add origin git@server:prj1.git | |
git push origin master |
This file contains hidden or 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
function arrayUnique(ar) | |
{ | |
if(ar.length && typeof ar!=='string') | |
{ | |
var sorter = {}; | |
var out = []; | |
for(var i=0,j=ar.length;i<j;i++) | |
{ | |
if(!sorter[ar[i]+typeof ar[i]]) | |
{ |
This file contains hidden or 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 | |
cd /var/ && mongodump |
This file contains hidden or 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 | |
mysqldump -h localhost -u foouser --password=foopass foodb | gzip > /var/db_backup.sql.gz |