Skip to content

Instantly share code, notes, and snippets.

View smoll's full-sized avatar

Shujon Mollah smoll

View GitHub Profile
@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 / 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
#!/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