Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Holubowski mholubowski

  • PLY Technologies
  • California
View GitHub Profile
View setup.txt
// tsconfig.json
{
"compilerOptions": {
"outDir": "./dist/",
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
@mholubowski
mholubowski / limeleads-db-custom.css
Last active Aug 19, 2017
Testing External CSS LL/Database
View limeleads-db-custom.css
.react-SearchNav {
display: none;
}
.react-MainBody {
border: 10px solid pink !important;
}
View kw_queue.rb
module KeywordQueue
extend self
QUEUE_KEY = 'keyword-queue'
LOCK_KEY = 'keyword-queue:lock'
DELAY_TIME = 1 # Time in seconds between scrape batches
KW_FAILURES_KEY = 'keyword_queue:keyword_failures'
KW_FAILED_QUEUE_KEY = 'keyword_queue:failed_keywords'
KW_FAILURE_THRESHOLD = 5
View holke.rb
# The variable raw_name_data is set to the multiline
# string surrounded by 'datablock'
raw_name_data = <<-datablock
Name: Mike bullshit bullshit bullshit bullshit bullshit
Age: 13 bullshit bullshit bullshit bullshit bullshit
bullshit bullshit bullshit bullshit bullshit bullshit
bullshit bullshit bullshit bullshit bullshit bullshit
bullshit bullshit bullshit bullshit bullshit bullshit
bullshit bullshit bullshit Name: Nick Age: 22 bullshit
bullshit bullshit bullshit bullshit bullshit bullshit
View gist:9629304
# add to ~./bash_profile
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
# create this file in `~/.git-completion.bash`
#!bash
#
# bash/zsh completion support for core Git.
#
View gist:9628521
# Opens the github page for the current git repository in your browser
# git@github.com:jasonneylon/dotfiles.git
# https://github.com/jasonneylon/dotfiles/
function gh() {
giturl=$(git config --get remote.origin.url)
if [ "$giturl" == "" ]
then
echo "Not a git repository or no remote.origin.url set"
exit 1;
fi
@mholubowski
mholubowski / stresser.conf
Last active Dec 29, 2015
Stresser configuration file for NotifyIO (CS 290B - Scalable Internet Services)
View stresser.conf
# MPPerf Configuration File
# The host, URI (relative to the document root) and port to test.
host = NotifyIO-LB-972606977.us-east-1.elb.amazonaws.com
uri =/organizations/2
port = 80
# The 'rate' is the number of number of connections to open per second.
# A series of tests will be conducted, starting at low rate,
# increasing by rate sep, and finishing at high_rate.
@mholubowski
mholubowski / v1-api-notifyIO.rb
Last active Dec 25, 2015
V1 api documentation for notify.IO
View v1-api-notifyIO.rb
# in gemfile
gem 'notifyIO'
# in config
notifier = NotifyIO::Notifier.new(auth_token: '12309jdsjLIJDwdsf')
# in controller or model
notifier.send do |n|
n.type = :alert
View gist:6542700
NotificationSubscription.where(confirmed: true)
.joins(property: :feedback_inputs)
.where("feedback_inputs.created_at >= :cutoff", {cutoff: 1.hour.ago})
@mholubowski
mholubowski / gist:5904945
Created Jul 1, 2013
prevent heroku idling
View gist:5904945
# in /tasks/scheduler.rake
desc "Called by Heroku cron add-on to stop spin down"
task :call_page => :environment do
uri = URI.parse('http://www.mikeholubowski.com/')
Net::HTTP.get(uri)
puts 'Pinged the site!'
end
# then use the heroku cron add-on to schedule it for every x minutes
You can’t perform that action at this time.