Skip to content

Instantly share code, notes, and snippets.

@searls
searls / gloan.sh
Last active August 20, 2018 15:22
Clone into a new repo and quickly switch into it. Helps avoid a haphazard collection of unorganized github repos all over my home directory. Once it's cloned (or even if it errors), just hit Paste & it'll change into the directory of the repo.
#!/bin/sh -e
# A simple script to keep a tidy ~/code directory organized by owner & then repo
# When the script is done, just hit command-v to switch into the directory
# (Github and Mac only. Sorry, openness!)
#
# Usage:
# gloan <org>/<repo>
# Or:
# gloan <org> <repo>

I would like to propose a lightning talk for the Reactive Conference demonstrating how you can interact with Arduino and/or Raspberry Pi GPIO's using React Native.

Here's is an example video where fellow speaker Brent Vatne controls my arduino device remotely using a sample react native app that can be found here

Thank you, @christopherdro

@miguelcma
miguelcma / DeviceUID.m
Created May 25, 2015 15:09
iOS Unique Device ID that persists between app reinstalls
/* DeviceUID.h
#import <Foundation/Foundation.h>
@interface DeviceUID : NSObject
+ (NSString *)uid;
@end
*/
// Device.m
@davetransom
davetransom / DistinguishedName.cs
Created April 10, 2015 23:51
Implementation of LDAP Distinguished Name parser, based on http://stackoverflow.com/a/25335936/137854. Also trims leading whitespace from attribute names and handles quoted values e.g. the `O="VeriSign, Inc."` in `CN=VeriSign Class 3 Secure Server CA - G3, OU=Terms of use at https://www.verisign.com/rpa (c)10, OU=VeriSign Trust Network, O="VeriS…
public class DistinguishedName
{
/// <summary>
/// Represents a name/value pair within a distinguished name, including the index of the part.
/// </summary>
public struct Part
{
public Part(string name, string value, int index = -1)
: this()
{
@blak3r
blak3r / zendesk-markdown-articles
Last active May 3, 2019 15:03
Zendesk, Hack to allow authoring in Markdown (which renders to HTML when viewing)
/**
* Step 1: Download showdown.js, from here: https://raw.githubusercontent.com/showdownjs/showdown/master/compressed/showdown.js
* Step 2: Customize Design --> edit theme --> assets and upload it.
* Step 3: Add a script tag to your head using the url from asset page.
* Step 4: Add this to article-body section, Javascript (make sure you select JS), add it before
* Step 5: Create an article, switch to source view, add <PRE>- to the top of the file,
* then put your markdown and end it with a </PRE>. If you don't do this, when you save the wysiwg will screw
* your markdown with html markup. The - is just what i chose to put on the top line... it could be any character
* or string
*
@awd
awd / migrate_paperclip_to_s3.rake
Created October 1, 2011 23:31
Migrate local paperclip assets to Amazon S3.
##
# Use this behind the scenes to migrate files from your filesystem to Amazon S3
# %: rake paperclip_migration:migrate_to_s3
##
namespace :attachments do
desc "migrate files from filesystem to s3"
task :migrate_to_s3 => :environment do
require 'aws/s3'