Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
# alias to edit commit messages without using rebase interactive | |
# example: git reword commithash message | |
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
# aliases to change a git repo from private to public, and public to private using gh-cli | |
alias gitpublic="gh repo edit --accept-visibility-change-consequences --visibility public" | |
alias gitprivate="gh repo edit --accept-visibility-change-consequences --visibility private" | |
# delete all your repos using gh-cli (please do not run this unless you want to delete all your repos) | |
gh repo list --limit 300 --json url -q '.[].url' | xargs -n1 gh repo delete --yes |
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
This is the Qt for Mac OS X Open Source Edition. | |
You are licensed to use this software under the terms of | |
the Lesser GNU General Public License (LGPL) versions 2.1. | |
You are also licensed to use this software under the terms of | |
the GNU General Public License (GPL) versions 3. | |
You have already accepted the terms of the license. |
{%- extends 'full.tpl' -%} | |
{% block input_group -%} | |
<div class="input_hidden"> | |
{{ super() }} | |
</div> | |
{% endblock input_group %} | |
{%- block header -%} | |
{{ super() }} |
# coding=UTF-8 | |
from __future__ import division | |
import nltk | |
import re | |
import requests | |
# Add your freebase key here | |
# If you don't have one, register at https://code.google.com/apis/console | |
FREEBASE_KEY = "" |
#!/usr/bin/env python | |
import operator | |
from math import sqrt | |
from reader import PreferenceReader | |
class SimilarityScoring(PreferenceReader): | |
""" | |
Extends the preference reader class to give our data structure the |
library(yhatr) | |
model.require <- function() { | |
library(plyr) | |
} | |
model.transform <- function(df) { | |
df | |
} |
#! /usr/bin/env python | |
""" | |
The MIT License (MIT) | |
Copyright (c) 2013 Hannes Bretschneider | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to |
<!--BracketHighlighter--> | |
<dict> | |
<key>name</key> | |
<string>Bracket Unmatched</string> | |
<key>scope</key> | |
<string>brackethighlighter.unmatched</string> | |
<key>settings</key> | |
<dict> | |
<key>foreground</key> | |
<string>#FF0000</string> |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for: