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
#!/bin/zsh | |
specialBranches=("master" "uat" "test" "release") | |
echo "\u001b[31mScanning released local branches...\n--------------------------------------------------------\u001b[0m" | |
releasedLocalBranches=() | |
for branch in $(git branch) | |
do | |
git show-ref -s --heads $branch | xargs git branch --contains | grep master > /dev/null | |
if [[ $? -eq 0 && ! " ${specialBranches[@]} " =~ " ${branch} " ]]; then |
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 internal ... | |
package internal | |
import ( | |
"fmt" | |
"github.com/go-sql-driver/mysql" | |
"golang.org/x/crypto/ssh" | |
"net" | |
) |
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
next_xid = 1 | |
active_xids = set() | |
records = [] | |
class TransactionConflictError(RuntimeError): | |
pass | |
def new_transaction(): |
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 jsonbench | |
import ( | |
"database/sql" | |
"fmt" | |
"math/rand" | |
) | |
var ( | |
jsonPattern = "{\"value\": \"%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
require 'openssl' | |
def hotp(secret, counter, digits = 6) | |
hash = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha1'), secret, int_to_bytestring(counter)) | |
"%0#{digits}i" % (truncate(hash) % 10**digits) | |
end | |
def truncate(string) | |
offset = string.bytes.last & 0xf | |
partial = string.bytes[offset..offset+3] |
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 ( | |
"fmt" | |
"reflect" | |
) | |
func containsAny(data interface{}, element ...interface{}) bool { | |
rVal := reflect.ValueOf(data) | |
switch rVal.Kind() { |
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 CryptoJS = require("crypto-js"); | |
var Property = require('postman-collection').Property; | |
var now = new Date(); | |
var timestampNow = parseInt(now.getTime() / 1000); | |
pm.collectionVariables.set("timestamp", timestampNow); | |
var host = pm.collectionVariables.get("host"); | |
var path = pm.request.url.getPath(); | |
var requestURL = host + path; |
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
git remote add --track master upstream git://github.com/upstreamname/projectname.git | |
git fetch upstream | |
git merge upstream/master |
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
/* use condition > */ | |
mysql> EXPLAIN SELECT * FROM test WHERE `test`.`activeday` > 10000 AND `test`.`deleted` = 0 ORDER BY id ASC LIMIT 20\G; | |
*************************** 1. row *************************** | |
possible_keys: index_on_test_to_activeday | |
key: PRIMARY | |
key_len: 4 | |
rows: 40 | |
filtered: 5.00 | |
Extra: Using where | |
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
==================== Supported Methods ====================== | |
['supervisor.addProcessGroup', 'supervisor.clearAllProcessLogs', 'supervisor.clearLog', 'supervisor.clearProcessLog', 'supervisor.clearProcessLogs', 'supervisor.getAPIVersion', 'supervisor.getAllConfigInfo', 'supervisor.getAllProcessInfo', 'supervisor.getIdentification', 'supervisor.getPID', 'supervisor.getProcessInfo', 'supervisor.getState', 'supervisor.getSupervisorVersion', 'supervisor.getVersion', 'supervisor.readLog', 'supervisor.readMainLog', 'supervisor.readProcessLog', 'supervisor.readProcessStderrLog', 'supervisor.readProcessStdoutLog', 'supervisor.reloadConfig', 'supervisor.removeProcessGroup', 'supervisor.restart', 'supervisor.sendProcessStdin', 'supervisor.sendRemoteCommEvent', 'supervisor.shutdown', 'supervisor.signalAllProcesses', 'supervisor.signalProcess', 'supervisor.signalProcessGroup', 'supervisor.startAllProcesses', 'supervisor.startProcess', 'supervisor.startProcessGroup', 'supervisor.stopAllProcesses', 'supervisor.stopProcess' |
NewerOlder