Skip to content

Instantly share code, notes, and snippets.

View infurno's full-sized avatar
🤖

Hal Borland infurno

🤖
View GitHub Profile
@infurno
infurno / .bashrc
Last active October 11, 2015 01:38
Infurno's prompt
# .bashrc
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
@infurno
infurno / gist:4192219
Created December 3, 2012 02:30
This snippet will disable the built in jQuery in Wordpress, but leaves it for the Wordpress admin side.
// Drop this in functions.php or your theme
if( !is_admin()){
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"), false, '1.3.2');
wp_enqueue_script('jquery');
}
@infurno
infurno / example.htaccess
Created February 4, 2013 15:29
htaccess. I always loose this.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
# Send request via index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond ^(.*)$ index.php/$1 [L]
</IfModule>
@infurno
infurno / example_controller.php
Last active December 12, 2015 03:29
This is an example CI Controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class #CONTROLERNAME extends MY_Controller {
public function #ACTION()
{
//code here ....
$this->load->view('welcome_message');
}
}
@infurno
infurno / serve
Created September 27, 2013 20:06
Quick start PHP server in current directory or custom directory.
#!/bin/bash
# Description: Quick start PHP server in current directory or custom directory.
# By: Hal Borland of Southern Fried Pixels
# Usage: serve "port" "htdoc"
# Example: serve 8000 ./public
if [[ "$1" != "" ]]; then
PORT=$1
else
PORT="8888"
@infurno
infurno / .screenrc
Last active August 29, 2015 13:56
Screen rc to allow you to use F5 and F6 to move from screen to screen.
# I got this from Andrew Nelson. https://github.com/red-tux
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
altscreen on
defscrollback 2000
termcapinfo xterm ti@:te@
@infurno
infurno / wpsnippets.cson
Last active August 29, 2015 13:57
WordPress Snippets for Atom Text Editor
# Simple WordPress Snippets
# for Atom Text Editor
# [email protected]
# robotsfollow.com/snippets
'.text.php':
'wp footer':
'prefix': 'wpfoot'
'body': '<?php wp_footer(); ?>'
'wp header':
'prefix': 'wphead'
@infurno
infurno / SassMeister-input-HTML.html
Created August 20, 2014 16:34
Generated by SassMeister.com.
<h1>H1 Heading</h1>
<h2>H2 Heading</h2>
<h3>H3 Heading</h3>
<h4>H4 Heading</h4>
@infurno
infurno / gist:6122e9be5ea9c7f00c6b
Created October 24, 2014 20:26
filter to convert string date to pretty date in Angularjs
app.filter('dateFormat', function($filter)
{
return function(input)
{
if(input == null){ return ""; }
var _date = $filter('date')(new Date(input), 'MMM dd yyyy');
return _date.toUpperCase();
@infurno
infurno / .vimrc
Last active January 31, 2016 17:02
My .vimrc
" size of a hard tabstop
set tabstop=4
" size of an "indent"
set shiftwidth=4
" a combination of spaces and tabs are used to simulate tab stops at a width
" other than the (hard)tabstop
set softtabstop=4
"Bundle Scripts-----------------------------