Skip to content

Instantly share code, notes, and snippets.

View greyaperez's full-sized avatar

Grey Perez greyaperez

View GitHub Profile
@greyaperez
greyaperez / auto_refresh.php
Created September 17, 2013 19:06
Auto Refreshes Current Page
// AUTO REFRESH (Every 3 secs)
echo '<meta http-equiv="refresh" content="3;url=http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'">';
@greyaperez
greyaperez / file_mod_time
Created August 23, 2013 18:46
Get File Mod UTC Timestamp
stat -c '%Y' file.ext
mysqldump -u {{USER}} -p{{PASS}} {{DB NAME}} > {{FILE}}.sql
@greyaperez
greyaperez / mysql-import.sh
Created July 8, 2013 15:01
MySQL Import File
mysql -u {{USER}} -p{{PASS}} -h localhost {{DB-NAME}} < {{FILE}}.sql
@greyaperez
greyaperez / github-collapsible-diff-files.js
Created June 14, 2013 15:52
Helps focus on individual files by enabling collapsible files views.
// ==UserScript==
// @name GitHub Diff File Toggle Slide
// @version 0.3
// @description Helps focus on individual files by collapsing and uncollapsing.
// @match https://github.com/*/*/commit/*
// @copyright 2013+, Tim A. Perez
// ==/UserScript==
$(function(){
setTimeout(function(){
$('#files').children('.file').children('.meta').click(function(){
@greyaperez
greyaperez / showErrors.php
Created June 12, 2013 19:50
Show Errors / Error Reporting
/* SHOW ERRORS */
error_reporting(E_ALL);
ini_set('display_errors', 1);