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
{ | |
search(type: REPOSITORY, query: "org:huboard-testing spooky-octo-pug", first: 1) { | |
edges { | |
node { | |
__typename | |
... on Repository { | |
owner { | |
id | |
} | |
name |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
(ns util.camelize-dasherize | |
(:import (clojure.lang IPersistentMap Keyword)) | |
(:require [clojure.string :as s] | |
[clojure.zip :as zip])) | |
; TODO: regex is slow, should try iterating the string. | |
(defn dasherize-string | |
"Converts an underscored or camelized string | |
into an dasherized one." | |
[s] |
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
var mention_id = 620996; | |
db.mentionStats.aggregate([ | |
{ $match: {'mention_id': mention_id}}, | |
{ $group: {'_id': { | |
'year': { '$year': "$verification_date" }, | |
'month': { '$month': "$verification_date" }, | |
'day': { '$dayOfMonth': "$verification_date" } | |
}, | |
'retweets': { $last: "$retweets" }}}, |