Skip to content

Instantly share code, notes, and snippets.

cdesch cdesch

Block or report user

Report or block cdesch

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
View gist:343ca5581e33253a4a0270a54c6950d7
$ virtualenv -p /usr/bin/python3 virtualenv_name
$ source virtualenv_name/bin/activate
View gist:19705f2bebdcce143c1fcd8907496955
This file has been truncated, but you can view the full file.
2001 silly pacote range manifest for @types/istanbul-reports@^1.1.1 fetched in 50ms
2002 silly resolveWithNewModule @types/istanbul-reports@1.1.1 checking installable status
2003 http fetch GET 304 54ms (from cache)
2004 silly pacote version manifest for @types/istanbul-lib-coverage@2.0.1 fetched in 55ms
2005 silly resolveWithNewModule @types/istanbul-lib-coverage@2.0.1 checking installable status
2006 http fetch GET 304 55ms (from cache)
2007 silly pacote range manifest for @types/yargs@^13.0.0 fetched in 57ms
2008 silly resolveWithNewModule @types/yargs@13.0.3 checking installable status
2009 http fetch GET 304 35ms (from cache)
cdesch / errorHandlerEx.js
Created Oct 6, 2019
ReactNative ErrorHandling Example - From
View errorHandlerEx.js
const defaultHandler = (ErrorUtils.getGlobalHandler && ErrorUtils.getGlobalHandler()) || ErrorUtils._globalHandler;
const customErrorHandler = async (err, isFatal) => {
await AsyncStorage.setItem('lastError', JSON.stringify(err, Object.getOwnPropertyNames(err)));
return defaultHandler(err, isFatal);
//inside the App component:
async componentWillMount() {
cdesch / numeric.rb
Created Aug 17, 2018
Rails Numeric
View numeric.rb
def is_numeric?(obj)
obj.to_s.match(/\A[+-]?\d+?(\.\d+)?\Z/) == nil ? false : true
def is_not_numeric?(obj)
View simple form inputs
<%= f.input :field, :wrapper_html => {class: "input-prepend input-append"} do %>
<span class="add-on">$</span>
<%= f.input_field :field %>
<span class="add-on">%</span>
<% end %>
View operators_domain_scrape.rb
require 'rubygems'
require 'mechanize'
require 'uri'
require 'csv'
#this script looks up vendors from a seed file and creates a new seed file with the domain
# using the first google search result returned
def get_host_without_www(url)
uri = URI.parse(url)
uri = URI.parse("http://#{url}") if uri.scheme.nil?
View vscode config
"files.autoSave": "onFocusChange",
"editor.tabSize": 2,
"workbench.colorTheme": "Solarized Dark",
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"editor.rulers": [
"ruby.lint": {
View digitalnote
aws s3 cp p2pstate.bin s3://digitalnotewallet/2018-01-07/p2pstate.bin
aws s3 cp blockchainindices.dat s3://digitalnotewallet/2018-01-07/blockchainindices.dat
aws s3 cp blockindexes.dat s3://digitalnotewallet/2018-01-07/blockindexes.dat
aws s3 cp blocks.dat s3://digitalnotewallet/2018-01-07/blocks.dat
aws s3 cp blockscache.dat s3://digitalnotewallet/2018-01-07/blockscache.dat
cdesch / SQL SAmple Data insert
Created Mar 19, 2018
timescale Timeseries example
View SQL SAmple Data insert
Sample Data SQL Insert
CREATE TABLE time_series (
name TEXT,
INSERT into time_series (name,timestamp) VALUES ('Test','2018-02-13T01:18:00');
INSERT into time_series (name,timestamp) VALUES ('Test','2018-02-13T01:22:00');
View C++ vs Ruby Loop
Vector<int> my_array = new Vector<int>;
for (int i = 0; i < my_array.length(); i++){
foreach(int i in my_array) {
You can’t perform that action at this time.