Skip to content

Instantly share code, notes, and snippets.

View cmrnh's full-sized avatar

Cameron Hendrix cmrnh

View GitHub Profile
@brendandawes
brendandawes / tools.md
Last active April 25, 2024 14:44
[Work in Progress] Tools — a constantly expanding list of some of the tools and services I use to make things, both hardware and software. Things can only appear on this list if it's something I've personally used to make things.
@evanrs
evanrs / rewriting-history-with-predicates.md
Last active November 4, 2015 07:14
Rewriting history with predicates (Reactive 2015 lightning talk proposal)

This is a proposal for a lightning talk I would give at the Reactive 2015 conference.

NOTE: If you like it, put a star ⭐ on it—the number of stars decides if it makes the cut!

Rewriting history with predicates

Redux provides a simple pattern for managing application state. As demonstrated in Dan Abramov's talk following this pattern lets you painlessly implement simple undo and time travel. By keeping a history of actions, and reducing a subset

@naveen
naveen / scrubs
Last active December 2, 2021 05:50
Scrubs: Your monthly notice to go through and disconnect unused applications across various services.
Your monthly notice to go through and disconnect unused applications across various services.
Twitter: https://twitter.com/settings/applications
Dropbox: https://www.dropbox.com/account/connected_apps
Facebook: https://www.facebook.com/settings?tab=applications
Google Apps: https://security.google.com/settings/security/permissions?pli=1
Google Ads: http://www.google.com/ads/preferences
Google Account: https://security.google.com/settings/security/secureaccount
Foursquare: https://foursquare.com/settings/connections
Instagram: https://instagram.com/accounts/manage_access
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@mattt
mattt / uiappearance-selector.md
Last active March 19, 2024 12:52
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
window.alert = function() {};
var customUsername = "POOOOP";
var postMessage = 'POOOOOOP';
var spamEvent = jQuery.Event("submit");
//spamEvent.keyCode = 13;
GhostPost.username = customUsername;
@sosedoff
sosedoff / opentable_client.rb
Last active September 15, 2020 14:46
OpenTable API Client - Visit http://opentable.herokuapp.com for details
require "faraday"
require "faraday_middleware"
module OpenTable
class Error < StandardError ; end
module Request
API_BASE = "http://opentable.herokuapp.com"
def connection
@danielphillips
danielphillips / HTMLLineBreakConvertor.h
Created March 25, 2011 13:37
Convert raw HTML to basic text preserving line breaks for use in UILabel or UITextView
@interface HTMLLineBreakConvertor : NSObject <NSXMLParserDelegate> {
NSMutableString* resultString;
NSDictionary* tags;
}
- (NSString*)convertEntiesInString:(NSString*)s;
@end