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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/hex" | |
"fmt" | |
"io" | |
"os" |
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
{"shopware/shopware":{"20049":{"size":281596,"stargazers_count":2823,"watchers_count":2823,"forks_count":1027,"open_issues_count":845,"forks":1027,"open_issues":845,"watchers":2823,"network_count":1027,"subscribers_count":104,"created_at":"2018-05-03T13:00:31Z","updated_at":"2024-11-22T01:29:09Z","pushed_at":"2024-11-21T17:36:06Z"},"20050":{"size":281707,"stargazers_count":2824,"watchers_count":2824,"forks_count":1027,"open_issues_count":847,"forks":1027,"open_issues":847,"watchers":2824,"network_count":1027,"subscribers_count":104,"created_at":"2018-05-03T13:00:31Z","updated_at":"2024-11-22T17:40:41Z","pushed_at":"2024-11-22T17:40:37Z"}},"shuup/shuup":{"20049":{"size":30596,"stargazers_count":2256,"watchers_count":2256,"forks_count":1101,"open_issues_count":178,"forks":1101,"open_issues":178,"watchers":2256,"network_count":1101,"subscribers_count":118,"created_at":"2015-06-03T12:53:21Z","updated_at":"2024-11-21T00:53:32Z","pushed_at":"2024-03-13T23:45:42Z"},"20050":{"size":30596,"stargazers_count":2256,"watc |
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
setInterval(function() { | |
t = $(".following").find(".follow-button"); //.not-following | |
if (!t[0]) { | |
window.scrollTo(0, | |
$(document).height()); | |
} else { | |
console.log(t.attr("class")); | |
t.trigger("click"); | |
} | |
}, 100 |
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
{ | |
"query": { | |
"function_score": { | |
"query": { | |
"bool": { | |
"must": [], | |
"must_not": [], | |
"should": [], | |
"filter": [{ "term": { "is_deleted": false } }], | |
"minimum_should_match": 1 |
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
// Method names for exclusion | |
excludes = [] | |
// e.g. excluding pop & push methods | |
// excludes = ['pop', 'push']; | |
// Objects for mocking | |
objects = [Array]; | |
// The restriction only effect inside the | |
// function (nested functions, chained invoking functions, ...) |
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
# https://www.madboa.com/geek/openssl - Some usefull openssl cooks. | |
# If you couldn't find somebody's PGP key, you can still send secure | |
# email using their SSL public certificate | |
# Fetching public certificate from example.com server and grabing the key from stream. | |
openssl s_client -connect example.com:443 | sed -ne \ | |
'/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > publickey.pem | |
# Encrypting a file/message using retrieved public certificate. | |
# You can choose another encryption algorithms, rather than `des3`. | |
# If a file is a binary file, you must put `-binary` option. |
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
https://github.com/rails/rails/pulls?q=is%3Apr+author%3Ahbakhtiyor+is%3Aclosed | |
https://github.com/mattdbridges/validates_formatting_of/pulls?q=is%3Apr+author%3Ahbakhtiyor+is%3Aclosed | |
https://github.com/mattdbridges/validates_formatting_of/pulls/hbakhtiyor | |
https://github.com/rubyzip/rubyzip/pulls?q=is%3Apr+author%3Ahbakhtiyor+is%3Aclosed | |
https://github.com/thoughtbot/shoulda-matchers/pulls?q=is%3Apr+author%3Ahbakhtiyor+is%3Aclosed | |
https://github.com/mongoid/mongoid/pulls?q=is%3Apr+author%3Ahbakhtiyor+is%3Aclosed | |
and another patches at ruby communities. |
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
def count_bottom_leaves(binary_tree) | |
return helper(binary_tree, get_depth_leaf(binary_tree)) | |
end | |
def helper (binary_tree, bound_depth, depth=0) | |
return 0 if(binary_tree == false) | |
left_node = binary_tree[1] | |
right_node = binary_tree[2] |
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 count_bottom_leaves = function(binary_tree) { | |
return helper(binary_tree, get_depth_leaf(binary_tree, 0), 0) | |
} | |
var helper = function(binary_tree, bound_depth, depth) { | |
if(binary_tree == false) { return 0 } | |
var left_node = get(binary_tree, 1) |