Skip to content

Instantly share code, notes, and snippets.

View buley's full-sized avatar
🤑

Tay buley

🤑
View GitHub Profile
@munificent
munificent / gist:9749671
Last active June 23, 2022 04:04
You appear to be creating a new IDE...
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:
@krmnn
krmnn / gist:9603278
Last active August 29, 2015 13:57
Debian Wheezy on Intel Galileo Development Board
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcpVerzeichnis Skelet:
> mkdir -p loop sdcard image
Plattenimage erstellen (3,8 GB max wegen FAT):
> dd if=/dev/zero of=loopback.img bs=10M count=380
@jheasly
jheasly / rtlsdr-osx.txt
Last active February 26, 2021 04:02 — forked from 0xabad1dea/rtlsdr-osx.txt
Build RTL-SDR on OSX with no tears using homebrew. Forked from https://gist.github.com/0xabad1dea/5777726, a macports solution.
rtl-sdr build notes for OSX
using macports http://www.macports.org/
see http://sdr.osmocom.org/trac/wiki/rtl-sdr
brew install cmake
brew install libusb
brew install pkgconfig
brew install sox # for easy audio
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
@buley
buley / atom-events
Created February 28, 2014 03:32 — forked from ardcore/atom-events
application:open-your-keymap
application:open-your-stylesheet
autocomplete:attach
autoflow:reflow-paragraph
bookmarks:clear-bookmarks
bookmarks:jump-to-next-bookmark
bookmarks:jump-to-previous-bookmark
bookmarks:toggle-bookmark
bookmarks:view-all
check:correct-misspelling
@chadothompson
chadothompson / refrigerator.pp
Last active August 29, 2015 13:56
Sophomoric Puppet Humor
service{"refrigerator":
ensure => running,
}
@JonMasterson
JonMasterson / gravity-form-with-post-meta
Last active February 9, 2017 22:53
Populate Gravity Form with email from post meta and output contact form on front end if the post author fills it out.
/**
* Add Contact Meta Box to Posts, Pages, or Any Custom Post Type
* Adds a contact form to single post pages when filled out
* Get the Gravity Forms plugin, then
* put this is your functions file
*/
$contact_meta_box = array(
'id' => 'jm-contact-meta-box',
'title' => 'Contact Email',
'context' => 'normal',
@cou929
cou929 / detect-private-browsing.js
Last active April 6, 2024 03:21
Detect private browsing mode (InPrivate Browsing or Incognito).
function retry(isDone, next) {
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false;
var id = window.setInterval(
function() {
if (isDone()) {
window.clearInterval(id);
next(is_timeout);
}
if (current_trial++ > max_retry) {
window.clearInterval(id);
class RootController < UIViewController
def viewDidLoad
super
@my_web_view = UIWebView.alloc.initWithFrame(view.bounds)
@my_web_view.delegate = self
@my_web_view.scalesPageToFit = FALSE
view.addSubview(@my_web_view)
@emiller
emiller / git-mv-with-history
Last active April 17, 2024 21:06
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@corsonr
corsonr / gist:6182904
Last active April 9, 2022 15:38
WooCommerce - Add custom fee to cart
<?php
/**
* WooCommerce Extra Feature
* --------------------------
*
* Add custom fee to cart automatically
*
*/
function woo_add_cart_fee() {