Skip to content

Instantly share code, notes, and snippets.

View tallsam's full-sized avatar

yeehah tallsam

View GitHub Profile
@tallsam
tallsam / README.md
Created December 1, 2016 04:43 — forked from jehaby/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
Verifying that +tallsam is my blockchain ID. https://onename.com/tallsam
@tallsam
tallsam / Minimal Raspbian.md
Last active March 12, 2016 09:11 — forked from yeokm1/Minimal Raspbian.md
Set of commands to strip down the default Raspbian installation as of 20 September 2014
rm -rf python_games
rm -rf Desktop

sudo apt-get --auto-remove --purge remove aptitude aptitude-common aspell aspell-en cifs-utils dbus dbus-x11 dconf-gsettings-backend:armhf dconf-service debconf-i18n debian-reference-common debian-reference-en desktop-base desktop-file-utils dictionaries-common dillo esound-common ed fbset firmware-atheros firmware-brcm80211 firmware-libertas firmware-ralink firmware-realtek fontconfig fontconfig-config fonts-droid fonts-freefont-ttf galculator gconf-service gconf2 gconf2-common gdb gdbserver gettext-base ghostscript gir1.2-glib-2.0 glib-networking:armhf glib-networking-common glib-networking-services gnome-icon-theme gnome-themes-standard-data gpicview groff-base gsettings-desktop-schemas gsfonts gsfonts-x11 gtk2-engines:armhf gvfs:armhf gvfs-backends gvfs-common gvfs-daemons gvfs-fuse gvfs-libs:armhf hicolor-icon-theme idle idle-python2.7 idle-python3.2 idle3 jackd jackd2 java-common krb5-locales leafpad lightdm lightdm-gtk-greeter lua5.1 luajit lxappearance lxde 
@tallsam
tallsam / cloudflare-dyndns.txt
Last active October 7, 2015 08:08
Cloudflare DynDNS
#!/bin/bash
# Parse the following json to get the id.
# curl https://www.cloudflare.com/api_json.html -d 'a=rec_load_all' -d 'tkn=[API_KEY]' -d 'email=[EMAIL]' -d 'z=[ZONE]'
# add this to /etc/crontab - */5 * * * * root /root/cloudflare_ddns.sh
NEW_IP=`dig +short myip.opendns.com @resolver1.opendns.com`
CURRENT_IP=`cat /var/tmp/current_ip.txt`
echo "New Ip = ${NEW_IP}"
@tallsam
tallsam / ttrss-feediron.json
Created July 1, 2015 06:32
Tinytiny RSS feed iron configuration
{
"pvponline": {
"type": "xpath",
"xpath": "div[contains(@class, 'comic')]"
},
"oatmeal": {
"type": "xpath",
"xpath": "div[@id='comic']",
"cleanup": [
"div[@id='content_footer2']"
#!/bin/bash
while :
do
clear
date +"%A %B %d, %Y at %T"
lines=`tput lines`
lines=`expr $lines - 5`
git --no-pager log --graph --decorate --pretty=oneline --abbrev-commit --color --all $* | head -n $lines
sleep 1
@tallsam
tallsam / Hail Dries
Last active August 29, 2015 13:58
Hail Dries
Hail Dries, full of cache.
Our Site is with thee.
Blessed art thou among developers,
and blessed is the code of thy fingers,
Drupal.
Holy Dries, Father of open source cms,
pray for us site builders,
now and at the hour of our launch.
Amen.
@tallsam
tallsam / laravel guard ubuntu 12.10
Last active December 19, 2015 12:38
Setting up Guard for SASS preprocessing when using Laravel. Ubuntu 12.10
# https://github.com/JeffreyWay/Laravel-Guard
# ruby 1.9.1 is the minimum req for this. Gem will still be verison 1.8.11
sudo apt-get install ruby1.9.1
ruby -v
gem -v
# php unit and PHP_Codecoverage
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
@tallsam
tallsam / xhprof_quick_and_dirty.md
Last active December 12, 2015 07:18 — forked from msonnabaum/xhprof_quick_and_dirty.md
setup xhprof on ubuntu 12.10 / apache

Install XHProf

Pear

sudo pear upgrade PEAR
sudo pecl install xhprof-0.9.2

From source

@tallsam
tallsam / problem_solver.info
Created May 23, 2012 06:15 — forked from nigelheap/problem_solver.info
problem_solver module
name = Problem solver
description = The module that will solve all your drupal problems.
package = Problems
version = 1.x
core = 7.x