Skip to content

Instantly share code, notes, and snippets.

Avatar
🏝️
Living the dream

Jeffrey Clark h0tw1r3

🏝️
Living the dream
View GitHub Profile
@h0tw1r3
h0tw1r3 / install.sh
Last active Aug 29, 2015
Arch Linux for ARM setup
View install.sh
## Device specific stuff
# Wandboard
pacman -Sy uboot-wandboard
pacman -Sy firmware-imx
pacman -Sy firmware-brcm43xx
curl https://raw.githubusercontent.com/Freescale/meta-fsl-arm-extra/master/recipes-bsp/broadcom-nvram-config/files/wandboard/nvram.txt \
> /lib/firmware/brcmfmac-sdio.txt
ln -s /lib/firmware/brcmfmac4329-sdio.bin /lib/firmware/brcmfmac-sdio.bin
@h0tw1r3
h0tw1r3 / ifup-d.sh
Last active Aug 29, 2015
enom dynamic dns scripts for various net config systems
View ifup-d.sh
#!/bin/bash
#
# You must set a domain access password in the eNom control panel.
#
ENOMURL="http://dynamic.name-services.com"
if [ "$METHOD" = loopback ]; then
exit 0
fi
@h0tw1r3
h0tw1r3 / adblock.sh
Created May 29, 2014
DNS ad and malware block script for DNSmasq and pixelserv
View adblock.sh
#!/bin/ash
#
# DNS Ad/Malware blocker for Tomato/DD-Wrt based routers
#
# Requires: DNSmasq and Pixelserv
#
# Merges block lists:
# * Winhelp2002
# * Pgl Yoyo
# * Malware Domains
@h0tw1r3
h0tw1r3 / createdb.php
Created Sep 21, 2014
Create db for phalcon invo demo
View createdb.php
<?php
use \Phalcon\Db\Column as Column;
use \Phalcon\Db\Index as Index;
use \Phalcon\Db\Reference as Reference;
$config = new Phalcon\Config\Adapter\Ini(__DIR__ . '/../app/config/config.ini');
$connection = new \Phalcon\Db\Adapter\Pdo\Sqlite(array('name' => $config->database->name));
@h0tw1r3
h0tw1r3 / mellanox-linux-3.17-dkms.diff
Created Jan 6, 2015
Fix building Mellanox ConnectX EN Driver on Linux 3.17+ -- dkms tested on Fedora 3.17
View mellanox-linux-3.17-dkms.diff
diff -ur a/mlnx-en-2.3/dkms.conf b/mlnx_en-2.3/dkms.conf
--- a/mlnx-en-2.3/dkms.conf 2014-11-19 03:56:27.000000000 -0600
+++ b/mlnx_en-2.3/dkms.conf 2015-01-06 10:52:04.171696932 -0600
@@ -20,7 +20,7 @@
DEST_MODULE_LOCATION[3]=/kernel/drivers/net/ethernet/mellanox/mlx4
STRIP[3]=$STRIP_MODS
PRE_BUILD="./scripts/mlnx_en_patch.sh ${MLNX_EN_PATCH_PARAMS}"
-MAKE="make -j`grep ^processor /proc/cpuinfo | wc -l`"
+MAKE="make -j`grep ^processor /proc/cpuinfo| wc -l` EXTRA_CFLAGS+='-Wno-error=date-time' "
CLEAN="make clean"
@h0tw1r3
h0tw1r3 / bundle_osx_libs.py
Last active Sep 18, 2015
Recursively change dynamic library link paths for non-system libraries to be relative to the linked program and copy them to <program>/../libs. I use this in a cross-compile environment on linux.
View bundle_osx_libs.py
#!/usr/bin/env python
# coding: utf-8
# Recursively change dynamic library link paths for non-system libraries
# to be relative to the linked program and copy them to <program>/../libs
#
# TODO: parse individual architectures (ever necessary?)
# modify temp lib instead of assuming path changes work
#
# Copyright: © 2015 Jeffrey Clark
@h0tw1r3
h0tw1r3 / sub-path redmine
Created Nov 9, 2011
config/environment.rb
View sub-path redmine
Redmine::Utils::relative_url_root = "/redmine"
@h0tw1r3
h0tw1r3 / local_manifest.xml
Created Jul 29, 2012
Cyanogenmod 10 local_manifest for SGH-I717 build
View local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_msm8660-common" path="device/samsung/msm8660-common" />
<project name="h0tw1r3/android_device_samsung_quincyatt" path="device/samsung/quincyatt" />
<project name="h0tw1r3/android_device_samsung_quincy-common" path="device/samsung/quincy-common" />
<project name="h0tw1r3/android_kernel_samsung_msm8660-common" path="kernel/samsung/msm8660-common" revision="jb-test" />
<project name="h0tw1r3/android_vendor_samsung_quincyatt" path="vendor/samsung/quincyatt" />
</manifest>
@h0tw1r3
h0tw1r3 / xcache.ini
Created Jul 31, 2012
Centos 5.8 xcache config for PHP 5.3.3
View xcache.ini
[xcache-common]
; change 'lib64' to 'lib' for 32bit
zend_extension = /usr/lib64/php/modules/xcache.so
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 3600
View .gitconfig
[core]
excludesfile = ~/.gitexcludes
[alias]
co = checkout
pv = pull -v
unstage = reset HEAD --
amend = commit -a --amend
last = log -1 HEAD
st = status -s
dh = diff HEAD