Name a value.
color = "red"
import requests | |
base_url = 'https://api.github.com' | |
def get_all_commits_count(owner, repo, sha): | |
first_commit = get_first_commit(owner, repo) | |
compare_url = '{}/repos/{}/{}/compare/{}...{}'.format(base_url, owner, repo, first_commit, sha) | |
commit_req = requests.get(compare_url) |
source 'https://rubygems.org' | |
gem 'sinatra' | |
gem 'sinatra-contrib' |
I got hit by the weird group reassignment when I upgraded to Mavericks. In my case the group was macports
(!). I’ve seen one report from a user who got cloakproxy
after the 10.11 upgrade, so apparently the bug is still there.
For some reason the OS X upgrader sometimes picks a group and changes the PrimaryGroupID
to 20
. Here’s the confirm:
dscl . -read Groups/cloakproxy
dscl . -read Groups/staff
And the fix:
<h2>Github Search API: Quantify Frameworks</h2><input type="text" placeholder="Username" id="username"> | |
<h4><button onclick="get()">GET</button></h4> | |
<p>Response:</p> | |
<pre id="a"></pre> |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
class InstagramPrivateController < ApplicationController | |
def initialize(username, password, photo, caption) | |
@username = username | |
@password = password | |
@photo = photo | |
@caption = caption | |
@cookiepath = Tempfile.new('cookies').path | |
@user_agent = generate_user_agent() |
package easyget | |
import ( | |
"io" | |
"io/ioutil" | |
"net/http" | |
) | |
// Define Request struct | |
type Request struct { |
# To get the created at timestamp | |
sample_object.id.generation_time | |
# To do range queries | |
start = Moped::BSON::ObjectId.from_time(Time.now.beginning_of_day) | |
finish = Moped::BSON::ObjectId.from_time(Time.now.end_of_day) | |
MyModel.where(:id => {'$gt' => start, '$lt' => finish}).count |