Skip to content

Instantly share code, notes, and snippets.

View tomiwaAdey's full-sized avatar
👨‍🍳
Cooking

Tomiwa Adey tomiwaAdey

👨‍🍳
Cooking
View GitHub Profile
@tomiwaAdey
tomiwaAdey / AngelList Markets.csv
Created February 18, 2019 14:53 — forked from eAndrius/AngelList Markets.csv
All AngelList Market tags with market url, id, number of followers, investors, startups and jobs, in no particular order. Scraped from https://angel.co/markets on 04/04/2015
name url id followers investors startups jobs
Information Technology https://angel.co/information-technology 25 6860 2381 84617 12929
Consumers https://angel.co/consumers 24 3969 1268 58531 7753
Enterprises https://angel.co/enterprises 733 3465 1172 36913 6727
Media https://angel.co/media-1 11 4699 1549 10186 1097
Health Care https://angel.co/health-care 13 113123 22508 7750 1154
Education https://angel.co/education 43 11233 3727 7495 993
Finance https://angel.co/finance 321 5029 1681 7143 1362
Life Sciences https://angel.co/life-sciences 9 3871 1285 4467 274
Platforms https://angel.co/platforms 152 3742 1218 4119 669
@tomiwaAdey
tomiwaAdey / lambdaip.js
Created November 26, 2017 12:22 — forked from johntitus/lambdaip.js
Get the public ip address of an AWS Lambda
var http = require('http');
exports.handler = function( event, context ){
http.get({'host': 'api.ipify.org', 'port': 80, 'path': '/'}, function(resp) {
resp.on('data', function(ip) {
context.succeed(ip.toString());
});
resp.on('error', context.fail);
});
};
@tomiwaAdey
tomiwaAdey / lambdaip.js
Created November 26, 2017 12:22 — forked from johntitus/lambdaip.js
Get the public ip address of an AWS Lambda
var http = require('http');
exports.handler = function( event, context ){
http.get({'host': 'api.ipify.org', 'port': 80, 'path': '/'}, function(resp) {
resp.on('data', function(ip) {
context.succeed(ip.toString());
});
resp.on('error', context.fail);
});
};
@tomiwaAdey
tomiwaAdey / install.sh
Last active October 16, 2017 09:48 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
#how to user
#Place in /root
#chmod +x /root/install.sh
#/root/install.sh to run it
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
@tomiwaAdey
tomiwaAdey / script.js
Created October 4, 2017 06:41 — forked from acoyfellow/script.js
XHR IG login
var params = "username=username&password=password";
new Promise(function (resolve, reject) {
var http = new XMLHttpRequest();
http.open("POST", "https://www.instagram.com/accounts/login/ajax/", true);
http.setRequestHeader('x-csrftoken', window._sharedData.config.csrf_token);
http.setRequestHeader('x-instagram-ajax', '1');
http.setRequestHeader('x-requested-with', 'XMLHttpRequest');
http.setRequestHeader("pragma", "no-cache");
http.setRequestHeader("cache-control", "no-cache");
@tomiwaAdey
tomiwaAdey / instaGet
Created October 4, 2017 06:41 — forked from acoyfellow/instaGet
How to get media from instagram via XHR
function getMedia(instaData, mediaCount, callback) {
var profileData = instaData.entry_data.ProfilePage[0];
var userID = profileData.user.id;
var totalMedia = profileData.user.media.count;
var mediaCount = mediaCount > totalMedia ? totalMedia : mediaCount;
var csrf_token = instaData.config.csrf_token;
var xhrBody = "ig_user(" + userID + ") { media.after(0, " + mediaCount + ") {nodes {display_src }}}";
var xhr = new XMLHttpRequest();
xhr.open("POST", '/query/', true)
@tomiwaAdey
tomiwaAdey / Realtime-Counter.js
Created October 4, 2017 06:39 — forked from acoyfellow/Realtime-Counter.js
A simple website counter that tracks website hits in real-time, uses Firebase
'use strict';
(function() {
var Firebase = require('firebase'),
Database = new Firebase('https://sendgrowth-counter.firebaseio.com/'),
pageURL = document.URL.split('.').join('_'),
pageURL = pageURL.split('/').join('*'),
domain = window.location.host,
rootRef = null,
pagePref='one',
labelPref,
document.querySelectorAll('div.ProfileCard-actions > div > div > div > button').forEach(function(btn){
var style = window.getComputedStyle(btn.querySelector('span.button-text.follow-text'));
if(style.display === 'block'){
btn.click();
};
});
@tomiwaAdey
tomiwaAdey / ses_statistics.rb
Created December 28, 2016 13:44 — forked from balepc/ses_statistics.rb
Amazon SES statistics Scout plugin
# Amazon Simple Email Service Statistics (http://aws.amazon.com/ses/)
# Displays Amazon SES automatically collected statistics regarding your sending activity:
# * Successful delivery attempts
# * Rejected messages
# * Bounces
# * Complaints
class SesStatisticsPlugin < Scout::Plugin
needs 'aws/ses'
# an example Monit configuration file for delayed_job
#
# To use:
# 1. copy to /var/www/apps/{app_name}/shared/delayed_job.monitrc
# 2. replace {app_name} and {environment} as appropriate
# 3. add this to your /etc/monit/monitrc
#
# include /var/www/apps/{app_name}/shared/delayed_job.monitrc
check process delayed_job with pidfile /var/www/apps/{app_name}/shared/pids/delayed_job.pid