Skip to content

Instantly share code, notes, and snippets.

@FutoRicky
FutoRicky / sendgrid_api_example.py
Last active February 11, 2017 21:03
API usage example using sendgrid api
import sendgrid
from sendgrid.helpers.mail import *
sg = sendgrid.SendGridAPIClient(apikey="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")
from_email = Email("test@example.com")
subject = "Hello World from the SendGrid Python Library!"
to_email = Email("bcollazo2010@gmail.com")
content = Content("text/plain", "Hello, Email!")
mail = Mail(from_email, subject, to_email, content)
response = sg.client.mail.send.post(request_body=mail.get())
@FutoRicky
FutoRicky / deploy-gh-pages.sh
Created June 22, 2016 05:10 — forked from chrislopresto/deploy-gh-pages.sh
Deploy Ember App to GitHub Pages
#!/usr/bin/env bash
git checkout master
git pull
rm -rf dist
ember build --environment production
git checkout gh-pages
git pull

Ä OS/2√fi¨NcmapU©æ˸¶glyfW3‘X§5@head‡Êæ9‰6hhea3í:$hmtx∫!Ñ:@\locaÑîì∆:ú0maxp:à name^O:Ï–post<º ê @ Å
å" ˇSaxí∆‹    " & 0 :!""ˇˇ R`xí∆‹    & 0 9!""ˇˇ"‡‚‰‰‰‰‰ÊÍÓÚÚÚÙÙÙ

@FutoRicky
FutoRicky / gist:ee94c237f011e005270642850d31d9e2
Created July 23, 2019 16:29
Instructions to modify inactive pull request locally
https://help.github.com/en/articles/checking-out-pull-requests-locally
require 'sidekiq/api'
queue = Sidekiq::Queue.new("default")
queue.each do |job|
job.klass # => 'TestWorker'
job.args # => ['easy']
job.delete if job.jid == 'abcdef1234567890' || job.klass == 'TestWorker'
end
ps -ax | grep <application name>
kill -9 <PID>
------------------------------
kill rails s:
$ lsof -wni tcp:3000
$ kill -9 PID