James Sugrue [asked][1], "@GitHubAPI is there a way to find the number of stars for a given repository?"
$ curl -ni "https://api.github.com/search/repositories?q=more+useful+keyboard" -H 'Accept: application/vnd.github.preview'
{
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
const ( | |
maxConcurrency = 10 |
#!/usr/bin/env bash | |
# | |
# This is an adaptation of code I wrote to download a private binary from GitHub. Such...pain. | |
# Why can't GitHub just offer a standardized URL you can download a release binary from and attach | |
# your Github Personal Access Token as a header? | |
# | |
# Since this code is an adaptation it hasn't been directly tested, but the code it was adapted from works | |
# and hopefully you can get the missing piece you're after by looking here. | |
# |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
#!/bin/sh | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
#!/usr/bin/env bash | |
# mostly from http://word.bitly.com/post/31921713978/static-analysis | |
function cfmt { | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: cfmt <file>" | |
else | |
astyle \ | |
--style=1tbs \ | |
--lineend=linux \ | |
--convert-tabs \ |
class A | |
def foo(num) | |
%w[one two three][num - 1] | |
end | |
end | |
describe A do | |
describe "#foo" do | |
RSpec::Matchers.define :do_foo do |args| | |
match do |instance| |
// | |
// HTTPLoader.h | |
// | |
#import <Foundation/Foundation.h> | |
typedef void(^ HTTPLoaderCompletionBlock)(NSData *data, NSError *erorr); | |
@interface HTTPLoader : NSObject |
<?xml version="1.0" encoding="UTF-8"?> | |
<classpath> | |
<classpathentry kind="src" path="src/main/java"/> | |
<classpathentry kind="src" path="src/test/java"/> | |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | |
<classpathentry kind="lib" path="/usr/share/java/commons-logging-1.1.1.jar"/> | |
<classpathentry kind="lib" path="/usr/share/java/junit4.jar"/> | |
<classpathentry kind="output" path="bin"/> | |
</classpath> |