Skip to content

Instantly share code, notes, and snippets.

View smoll's full-sized avatar

Shujon Mollah smoll

View GitHub Profile
@smoll
smoll / Pipfile
Created January 8, 2019 16:33
Testing gsutil's transparent compression of a csv file (and reading it back from the python lib)
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
google-cloud-storage = "*"
@smoll
smoll / keybase.md
Created March 16, 2018 20:03
keybase.md

Keybase proof

I hereby claim:

  • I am smoll on github.
  • I am smoll (https://keybase.io/smoll) on keybase.
  • I have a public key ASBHo8T9zVPaZkuH45iYFk59KEMa8-hPmrmgw4mGOxGuPgo

To claim this, I am signing this object:

@smoll
smoll / post-npm-install.js
Last active February 16, 2018 21:53
Quick 'n Dirty hack to rewrite minify.js to make join-monster play nice with React Native
const fs = require('fs')
const path = require('path')
const rewriteFile = (file, value, replacement) => {
const data = fs.readFileSync(file, 'utf-8')
const replaced = data.replace(value, replacement)
fs.writeFileSync(file, replaced, 'utf-8')
}
const rewriteMinifyJs = () => {
@smoll
smoll / scrapeGoogleImages.js
Created July 11, 2017 14:29 — forked from flovv/scrapeGoogleImages.js
scrapeGoogleImages_file1
var url ='https://www.google.de/search?q=Yahoo+logo&source=lnms&tbm=isch&sa=X';
var page = new WebPage()
var fs = require('fs');
var vWidth = 1080;
var vHeight = 1920;
page.viewportSize = {
width: vWidth ,
height: vHeight
@smoll
smoll / Auth Class
Created January 6, 2017 20:05 — forked from singledigit/Auth Class
Pattern for using Cognito User Pools as authentication against Cognito Identity
import {inject} from 'aurelia-framework';
import {Session} from './session';
@inject(Session)
export class Auth {
// App specific
userPoolId = 'us-east-1_fgCWraBkF';
appClientId = '57lq262n28o7ddt8i36jcjj7qd';
@smoll
smoll / USING-DIFFMERGE.md
Last active October 21, 2023 23:37
Using DiffMerge as your git mergetool (for Mac OS X / macOS)
@smoll
smoll / gist:7f552ff0eb12a7c362f321b9f56aad65
Created June 14, 2016 13:33 — forked from bruchu/gist:8230184
change s3 content-type using aws ruby sdk
bash:
export AWS_ACCESS_KEY_ID='...'
export AWS_SECRET_ACCESS_KEY='...'
export AWS_REGION='us-east-1'
irb or ruby script:
require 'aws-sdk'
s3 = AWS::S3.new
@smoll
smoll / unparse.rb
Last active November 5, 2015 18:39
Adapted from the unparser usage example, at https://github.com/mbj/unparser#usage
require 'parser/current'
require 'unparser'
require 'byebug'
module YourHelper
def s(type, *children)
Parser::AST::Node.new(type, children)
end
end
#!/bin/bash
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1
@smoll
smoll / rerun.rb
Created September 29, 2014 15:19
Modify cucumber v1.3.17 rerun formatter to only rerun failed scenarios
require 'cucumber/formatter/io'
module Cucumber
module Formatter
# The formatter used for <tt>--format rerun</tt>
#
# This formatter keeps track of all failing features and print out their location.
# Example:
#
# features/foo.feature:34 features/bar.feature:11:76:81