This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
name: "twitter-timeline", | |
description: "Browse Twitter Timeline", | |
preview: function(pblock, directObject) { | |
var twitterHome = "http://twitter.com/home"; | |
jQuery.get( twitterHome, {}, function(data) { | |
CmdUtils.loadJQuery(function(jQuery){ | |
pblock.innerHTML = jQuery("#timeline",data).html(); | |
}); | |
}, "html"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if rails_env = ENV['RAILS_ENV'] | |
rails_root = File.basename(Dir.pwd) | |
rails_env_string = case rails_env | |
when 'development' | |
'dev' | |
when 'production' | |
'prod' | |
else | |
rails_env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Cleanup Sidekiq uniquejobs in Redis | |
# see https://github.com/mhenrixon/sidekiq-unique-jobs/issues/195 | |
# | |
require 'bundler/setup' | |
require 'sidekiq/api' | |
DRY_RUN = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import json | |
import requests | |
REPO_URL = "https://api.github.com/repos/<USER>/<REPO>/contents/<PATH>/<TO>/<FILE>.json" | |
TOKEN = "<YOUR PAT OR OAUTH TOKEN>" | |
headers = { | |
"Authorization": f"token {TOKEN}", | |
"Accept": "application/vnd.github.v4+raw" |