Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
jedi4ever / dpkg-gnutar
Created Mar 17, 2011
homebrew formula to get dpkg working a mac
View dpkg-gnutar
require 'formula'
class Tar <Formula
url 'http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz'
homepage 'http://www.gnu.org/software/tar/'
md5 '00d1e769c6af702c542cca54b728920d'
# depends_on 'cmake'
def install
@chasereeves
chasereeves / gist:3124135
Created Jul 16, 2012
Wordpres Custom Menu/Navigation Walker - remove all list items from menu, only links remain.
View gist:3124135
//========================================================== CUSTOM MENU WALKER - remove list stuff, only links
class custom_menu_walker_remove_list extends Walker_Nav_Menu {
function start_el(&$output, $item, $depth, $args) {
global $wp_query;
$class_names = $value = '';
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
$classes[] = 'menu-item-' . $item->ID;
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
$class_names = ' class="' . esc_attr( $class_names ) . '"';
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
@Lewiscowles1986
Lewiscowles1986 / lc-svg-upload.php
Last active Aug 4, 2016
SVG Media Plugin for WordPress (Works since 4.1.2!)
View lc-svg-upload.php
<?php
// Please see https://github.com/Lewiscowles1986/WordPressSVGPlugin from now on
@sou-lab
sou-lab / wp.fish
Created Mar 25, 2016
wp-cli fish completion
View wp.fish
# wp-cli
complete -c wp -l cache --description 'Manage the object cache.'
complete -c wp -l cap --description 'Manage user capabilities.'
complete -c wp -l cli --description 'Get information about WP-CLI itself.'
complete -c wp -l comment --description 'Manage comments.'
complete -c wp -l core --description 'Download, install, update and otherwise manage WordPress proper.'
complete -c wp -l cron --description 'Manage WP-Cron events and schedules.'
complete -c wp -l db --description 'Perform basic database operations.'
complete -c wp -l eval --description 'Execute arbitrary PHP code.'
complete -c wp -l eval-file --description 'Load and execute a PHP file.'
@stek29
stek29 / 0info.md
Last active Dec 30, 2019
UntetherHomeDepot offsets
View 0info.md

Update

I was tired of waiting so I've just crawled kernelcaches for all avaliable devices and made one big offsets.json containing all offsets. However, they are untested. They *should* work, but refer to table below if you're afraid of bootloops.


MESSAGE TO jk9357 OR WHOEVER IS MAINTAINING WALL.SUPPLIES

Some offsets are wrong/missing on wall.supplies.
@stek29
stek29 / unlocknvram.c
Last active Apr 1, 2020
async_wake nvram
View unlocknvram.c
// iOS 11 moves OFVariables to const
// https://twitter.com/s1guza/status/908790514178301952
// however, if we:
// 1) Can find IODTNVRAM service
// 2) Have tfp0 / kernel read|write|alloc
// 3) Can leak kernel address of mach port
// then we can fake vtable on IODTNVRAM object
// async_wake satisfies those requirements
// however, I wasn't able to actually set or get ANY nvram variable
// not even userread/userwrite
@nderkach
nderkach / ios_github_gif.md
Last active May 13, 2020
How to record iOS screen and share it on github
View ios_github_gif.md

Record a screencast with QuickTime Player

  1. Connect an iOS defice with a cable
  2. In QuickTime Player: Option-Cmd-N (New Movie Recording) -> Select your device from the recording menu:

http://cl.ly/image/1w0y3Y0H2g2X/record.png

Install gifify

@maxfenton
maxfenton / a-new-mac-setup.md
Last active Jul 29, 2020
System setup stuff for a new mac
View a-new-mac-setup.md

New computer setup

a/o 2020-05-29

--

Format the drive

  1. Restart with Cmd-R or Cmd-D
  2. Erase drive / 3x if second-hand
  3. Reinstall MacOS
@cmacdonnacha
cmacdonnacha / color-palette.scss
Created Apr 6, 2016
Material Design Color Palette
View color-palette.scss
$white: #ffffff;
$black: #000000;
$red50: #ffebee;
$red100: #ffcdd2;
$red200: #ef9a9a;
$red300: #e57373;
$red400: #ef5350;
$red500: #f44336;
$red600: #e53935;
$red700: #d32f2f;
@arigesher
arigesher / responsive-flickr-embeds
Last active Oct 26, 2020
JQuery code to make Flickr embeds responsive (and resize correctly when loading in a mobile browser). See http://ari.gesher.net/photos-the-gesher-world-tour/ for a working example.
View responsive-flickr-embeds
$(document).ready(function() {
$("#pics iframe").each(function(index) {
var ratio = $(this).height() / $(this).width();
var origHeight = $(this).height();
var origWidth = $(this).width();
var self = this;
// bind to window with closure that references the
// iframe since the iframe doesn't get resize events
// until (you know) we resize it.
$(window).resize(function() {