Skip to content

Instantly share code, notes, and snippets.

View euforic's full-sized avatar

Christian Sullivan euforic

View GitHub Profile
@euforic
euforic / github_gpg_key.md
Created October 27, 2021 16:28 — forked from ankurk91/github_gpg_key.md
Signing git commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@euforic
euforic / ethutil.go
Last active July 4, 2018 07:38
Ethereum Unit Converter
package ethutil
import (
"fmt"
"math"
"math/big"
"strings"
"github.com/shopspring/decimal"
)
@euforic
euforic / index.js
Created December 5, 2017 20:07
Bottom Card Home Screen React-Native
import React, {PureComponent} from 'react'
import {View, Image, Text, ScrollView} from 'react-native'
//import leafImg from './img/leaf-bg.jpg'
import styles from './styles'
class Home extends PureComponent {
render() {
return (
@euforic
euforic / links.js
Last active August 3, 2017 21:52
Find links on a page and copy to clipboard in Chrome console
@euforic
euforic / opentable.md
Created August 2, 2017 21:29
Planz Opentable Scraper

Usage

Request

let client = new opentable.Client()

client.search({
  covers: 2, // number of people attending
  Limit: 200, // number of results to show
@euforic
euforic / server.go
Created July 20, 2017 23:34
Add pprof to a labstack/echo server
package server
import (
"fmt"
"net/http"
_ "net/http/pprof"
"github.com/labstack/echo"
)
@euforic
euforic / xml_entity.js
Created February 14, 2014 00:31
Simple xml entity encoder / decoder
function decodeEntity(str) {
var names = {
'nbsp': 160,
'lt': 60,
'gt': 62,
'amp': 38,
'cent': 162,
'pound': 163,
'yen': 164,
'euro': 8364,
function mkdirP (p, fn, made) {
if (!made) made = null;
var cb = fn || function () {};
p = path.resolve(p);
fs.mkdir(p, function (err) {
if (!err) return cb(null, made || p);
if (err.code != 'ENOENT') return err;
mkdirP(path.dirname(p), mode, function (err, made) {
@euforic
euforic / xhr.js
Created August 21, 2013 22:08
superagent XHR Titanium Shim
function XMLHttpRequest() {
// titanium xhr client
this._proxy = Ti.Network.createHTTPClient();
// mapping for compatible functions
this.getResponseHeader = this._proxy.getResponseHeader;
this.open = this._proxy.open;
@euforic
euforic / Emitter.js
Last active March 15, 2017 14:25
Simple Socket Wrapper for Titanium
/*!
* Event Emitters
*/
/**
* Initialize a new `Emitter`.
*
* @api public
*/