Skip to content

Instantly share code, notes, and snippets.

Ian Spence ecnepsnai

Block or report user

Report or block ecnepsnai

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ecnepsnai
ecnepsnai / update_go.sh
Created Apr 9, 2019
Script to manage go versions easily
View update_go.sh
#!/bin/bash
set -e
VERSION=${1:?Version Required}
INSTALL_DIR="/usr/local/go"
if [[ ! -d ${INSTALL_DIR} ]]; then
mkdir -p ${INSTALL_DIR}
fi
VERSION_DIR="${INSTALL_DIR}/${VERSION}"
View settings.json
{
"workbench.colorTheme": "One Dark Pro",
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 13,
"editor.fontFamily": "Fira Code",
"window.zoomLevel": -1,
"go.testOnSave": false,
"go.liveErrors": {
"enabled": true,
"delay": 500
@ecnepsnai
ecnepsnai / install.sh
Created Jan 5, 2019
Install Go Report Card
View install.sh
#!/bin/bash
go get github.com/gojp/goreportcard/cmd/goreportcard-cli
go get github.com/alecthomas/gometalinter
go get github.com/fzipp/gocyclo
go get github.com/gordonklaus/ineffassign
go get github.com/client9/misspell/cmd/misspell
@ecnepsnai
ecnepsnai / ocsp.c
Created Feb 24, 2018
Get OCSP URI from Certificate
View ocsp.c
X509 * cert;
AUTHORITY_INFO_ACCESS * info = X509_get_ext_d2i(cert, NID_info_access, NULL, NULL);
int len = sk_ACCESS_DESCRIPTION_num(info);
for (int i = 0; i < len; i++) {
// Look for the OCSP entry
ACCESS_DESCRIPTION * description = sk_ACCESS_DESCRIPTION_value(info, i);
if (OBJ_obj2nid(description->method) == NID_ad_OCSP) {
if (description->location->type == GEN_URI) {
char * ocspurlchar = i2s_ASN1_IA5STRING(NULL, description->location->d.ia5);
@ecnepsnai
ecnepsnai / guidelines.txt
Created Jun 6, 2017
App Store Review Guidelines
View guidelines.txt
App Store Review Guidelines
Introduction
Apps are changing the world, enriching people’s lives, and enabling developers like you to innovate like never before. As a result, the App Store has grown into an exciting and vibrant ecosystem for millions of developers and more than a billion users. Whether you are a first time developer or a large team of experienced programmers, we are excited that you are creating apps for the App Store and want to help you understand our guidelines so you can be confident your app will get through the review process quickly.
The guiding principle of the App Store is simple - we want to provide a safe experience for users to get apps and a great opportunity for all developers to be successful. We have updated the App Review Guidelines with that principle in mind. The guidelines themselves haven’t changed, but they are better organized and provide more context. On the following pages you will find guidelines arranged into five clear sections: Safety, Performance, Business, Design,
@ecnepsnai
ecnepsnai / csvhash.rb
Created Jan 10, 2017
Ruby CSV to/from Hash
View csvhash.rb
require 'csv'
class CSV
# Read the CSV file into an array of hashes
# @param path [String] The path to the CSV file to read
#
# @return [Array<Hash>] An array of hashes of each column mapped to the rows value
def self.readHash(path)
columns = {} # name mapped to index
return_hash = []
View obfuscate.js
var images = [
//"http://artdelicorp.com/img2/n.gif",
//"http://artdelicorp.com/img2/b.jpg",
//"http://artdelicorp.com/img2/m.gif",
//"http://artdelicorp.com/img2/bluered-00.gif",
//"http://artdelicorp.com/img2/d.jpg",
//"http://artdelicorp.com/img2/e.jpg",
//"http://artdelicorp.com/img2/f.jpg",
//"http://artdelicorp.com/img2/g.jpg",
//"http://artdelicorp.com/img2/h.jpg",
@ecnepsnai
ecnepsnai / Prefix.pch
Created Feb 25, 2016
Handy Objective-C macros!
View Prefix.pch
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#define MINIMUM_SERVER_VERSION @"1.0"
#if DEBUG
#define d(s, ...) NSLog(@"%@", [NSString stringWithFormat:(s), ##__VA_ARGS__ ?:@""])
#else
@ecnepsnai
ecnepsnai / Packages
Last active Oct 20, 2016
Sublime Settings
View Packages
SublimeLinter
SublimeLinter-jscs
SublimeLinter-jshint
SublimeLinter-pep8
git
SideBarEnhancements
GitGutter
Cython
Stylus
BracketHighlighter
View urlfilter.conf
config webfilter urlfilter
edit 0
set name AdServers
config entries
edit 0
set url "101com.com"
set action block
next
next
edit 0
You can’t perform that action at this time.