Skip to content

Instantly share code, notes, and snippets.

View graphis's full-sized avatar

Zsolt Sándor graphis

View GitHub Profile
@graphis
graphis / ramdisk.sh
Created September 17, 2016 11:24 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@graphis
graphis / simpleMLB.sh
Created September 14, 2016 18:13 — forked from al3xtjames/simpleMLB.sh
Simple Main Logic Board (MLB) Serial Generator Script
#!/bin/bash
#
# Simple Main Logic Board (MLB) Serial Generator Script by TheRacerMaster
# Based off the work of Hanger1, AGuyWhoIsBored & Alien:X
# NOTE: This is a simple script that doesn't do any checking of other SMBIOS values. It needs valid SMBIOS data which includes the following:
# - Valid SmUUID value in Clover config.plist under SMBIOS (generated using uuidgen)
# - ROM value set to UseMacAddr0 in Clover config.plist (uses MAC address of your first NIC as ROM value)
# - Properly formatted serial number (doesn't have to be a real one, just formatted properly) in Clover config.plist under SMBIOS
# - Don't use a generic serial number (such as Clover's default)! It needs to be at least semi-unique.
# - Try using a generated serial number that isn't real (but formatted correctly) from Clover Configurator, Chameleon Wizard, etc.
@graphis
graphis / PDO PHP Class
Created April 15, 2016 11:36 — forked from geoffreyhale/PDO PHP Class
Roll Your Own PDO PHP Class
<?php
/**
* http://culttt.com/2012/10/01/roll-your-own-pdo-php-class/
*/
?>
@graphis
graphis / FontInstaller.py
Created January 20, 2016 10:39 — forked from omz/FontInstaller.py
FontInstaller
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
@graphis
graphis / .htaccess
Last active September 14, 2015 11:02
CI: Simple .htaccess using mod_rewrite for CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
@graphis
graphis / _htaccess
Last active September 14, 2015 10:57
root/index.php -- simple application bootstrap with some $path variables
RewriteEngine On
RewriteRule ^$ index.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@graphis
graphis / new pjax 1.2 init
Created December 4, 2012 07:35
new pjax 1.2 init
/*
* new pjax 1.2 init
**/
function pjax_init()
{
$(document).pjax('a', '#content')
// 1
.on('pjax:beforeSend', function () { console.log('01 pjax:beforeSend'); })
@graphis
graphis / 200.php
Created November 22, 2012 08:51 — forked from evanpurkhiser/200.php
<?php
class HTTP_Exception_200 extends HTTP_Exception {
protected $_status = 200;
protected $_response;
/**
* Set the response object to retur when requested from get_response