Skip to content

Instantly share code, notes, and snippets.

View ellisio's full-sized avatar
:octocat:
Go Avs!

Andrew Ellis ellisio

:octocat:
Go Avs!
View GitHub Profile
# Compiled Python files
*.pyc
# Folder view configuration files
.DS_Store
Desktop.ini
# Thumbnail cache files
._*
Thumbs.db
# Create a new directory and enter it
function mkd() {
mkdir -p "$@" && cd "$@"
}
# Determine size of a file or total size of a directory
function fs() {
if du -b /dev/null > /dev/null 2>&1; then
local arg=-sbh
else
# Set colorflag for LS
colorflag="-G"
# List all files colorized in long format
alias l="ls -l ${colorflag}"
# List all files colorized in long format, including dot files
alias la="ls -la ${colorflag}"
# List only directories
version: '2'
#
# Network Configuration
#
networks:
default:
#
# Services Configuration
[Unit]
Description=Share local port(s) with ngrok
After=syslog.target network.target
[Service]
User=vagrant
Type=simple
Restart=always
RestartSec=1min
TimeoutSec=0
[
{ "date": 20150101, "text": "Cat" },
{ "date": 20150101, "text": "Dog" },
{ "date": 20150201, "text": "Fish" }
]
<?php
class Date {
/**
* Convert a local timestamp to a GMT timestamp.
*
* @static
*
* @param string $timestamp
* @param string $timezone
* @param string $format
@ellisio
ellisio / Homebrew PHP 5.3.10
Created February 2, 2012 23:20
Homebrew PHP 5.3.10
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
def postgres_installed?
`which pg_config`.length > 0
end
<html>
<head>
<title>Test</title>
</head>
<body>
<div id="object">
<div class="box"></div>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript">
apt-get install ssh