Skip to content

Instantly share code, notes, and snippets.

View jpsilvashy's full-sized avatar
🎯
Focusing

JP Silvashy jpsilvashy

🎯
Focusing
View GitHub Profile
@jpsilvashy
jpsilvashy / pow.sh
Created February 28, 2012 08:10
pow
#!/bin/sh
# W
# R RW W.
# RW::::RW DR::R
# :RRRRRWWWWRt:::::::RRR::::::E jR
# R.::::::::::::::::::::::::::Ri jiR:::R
# R:::::::.RERRRRWWRERR,::::::Efi:::::::R GjRRR Rj
# R::::::.R R:::::::::::::;G RRj WWR RjRRRRj
# Rt::::WR RRWR R::::::::::::::::fWR::R; WRW RW R
# WWWWRR:::EWR E::W WRRW:::EWRRR::::::::: RRED WR RRW RR
@jpsilvashy
jpsilvashy / README.md
Last active November 17, 2020 17:28
Post Google Sheets form entries to Slack

Post Google Sheets form entries to Slack

By using Google Form's script editor, you can call Slack webhooks when form submissions are made. You can use this script to do things like creating a live feedback form for taking questions from an audience or notifying your team when someone signs up for an event.

Setup

First, be sure you're collecting the email address in the form:

'img'

@jpsilvashy
jpsilvashy / Brewfile
Last active November 16, 2020 18:45 — forked from ryanhanwu/Brewfile
New Mac Setup Script 2019
# Taps
tap 'caskroom/cask'
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
tap 'homebrew/bundle'
## Shell Utilities
brew 'coreutils'
brew 'zsh'
brew 'zsh-completions'
function hostReachable() {
// Handle IE and more capable browsers
var xhr = new ( window.ActiveXObject || XMLHttpRequest )( "Microsoft.XMLHTTP" );
var status;
// Open new request as a HEAD to the root hostname with a random param to bust the cache
xhr.open( "HEAD", "//" + window.location.hostname + "/?rand=" + Math.floor((1 + Math.random()) * 0x10000), false );
// Issue request and handle response
#metric-group-PatientPregnancyOutcomes-6 > div > table > tbody > tr:nth-child(19)
#metric-group-PatientPregnancyOutcomes-6 > div > table > tbody > tr:nth-child(19) > td
DefaultReportingYear: 2017
IsApprovePreviousYearFinalReport: False
ReportingYear: 2016
Diagnosis: -1
CycleType: 1
AdditionalFilters[0].CsrAdditionalFilterID: 1
AdditionalFilters[0].IncludeOnly: false
AdditionalFilters[0].Exclude: false
AdditionalFilters[1].CsrAdditionalFilterID: 2
AdditionalFilters[1].IncludeOnly: false
@jpsilvashy
jpsilvashy / facebook_url_to_id.rb
Created April 24, 2019 15:08
Use findmyfbid.com to get facebook ids from URLs
require 'selenium-webdriver'
module ScrapeTools
def self.connect(base_url)
loop do
# proxy
proxy = ProxyServer.get_round_robin # get a proxy that hasent been used lately
puts "[ScrapeTools] trying proxy: #{proxy.as_string}"
# == Schema Information
#
# Table name: proxy_servers
#
# id :uuid not null, primary key
# ip_addr :string
# port :string
# country :string
# last_used_at :datetime
# active :boolean
@jpsilvashy
jpsilvashy / generateAppIcon.sh
Last active December 29, 2018 15:34 — forked from roblabs/generateAppIcon.sh
Generate app icons and xcassets file from a single image. generateAppIcon.sh AppIcon.png
#!/bin/bash -e
# --------------------------------------------------------
# Generate app icons and xcassets file from a single image
# Ben Clayton, Calvium Ltd.
# https://gist.github.com/benvium/2be6d673aa9ac284bb8a
# --------------------------------------------------------
#
# Usage with an input of 1024x1024 PNG file
# generateAppIcon.sh AppIcon.png
@jpsilvashy
jpsilvashy / 03_restart_que.config
Last active May 29, 2018 23:47
ElasticBeanstalk que upstart job and and post deploy script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/etc/init/que.conf":
mode: "000755"
owner: root
group: root