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
'shun | |
'slid | |
'twas | |
2,4-d | |
30-30 | |
a-cry | |
a-day | |
a-hey | |
a-one | |
a-row |
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
-- Geneate query | |
SELECT format('alter table %s owner to root;', tablename) FROM pg_tables WHERE schemaname = 'public' | |
-- On psql execute \gexec to eval all above queries. | |
\gexec | |
-- Generate query for sequences | |
select format('alter sequence %s owner to root;', sequencename) FROM pg_sequences WHERE schemaname = 'public'; |
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 envars | |
import "errors" | |
var ( | |
ErrorVaultSecretNotFound2 = errors.New("vault secret not found") | |
ErrorCannotFindValue2 = errors.New("can not find value") | |
) | |
func IsNotFoundError2(err error) bool { |
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
## | |
# Redirect all outbound requests from port 80 to a specific IP and port. | |
# | |
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination $DEST_SERVER:$DEST_PORT |
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
class YAMLPreservedStringQuote | |
def initialize(*doublequoted_nodes) | |
@doublequoted_nodes = doublequoted_nodes | |
end | |
def load(str) | |
ast = YAML.parse_stream(StringIO.new(str)) | |
ast.grep(Psych::Nodes::Mapping).each do |node| | |
node.children.each_slice(2) do |key, value| |
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
ps axu | grep "unicorn" | grep -v "grep" | awk '{split($0,a," "); s+=a[6]} END {print s}' | pbcopy |
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" | |
"context" | |
"fmt" | |
"github.com/docker/docker/api/types" | |
"github.com/docker/docker/api/types/container" | |
"github.com/docker/docker/client" | |
"io" |
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: we.co/tools/oktaremember | |
import: | |
- package: github.com/moby/moby | |
version: 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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
gem 'rack' | |
gem 'dry-container' | |
gem 'minitest' | |
gem 'mocha' |
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/sh | |
API_USER="<USER>:<PASSWORD>" | |
API_URL="https://<SOME_SERVICE>.cloudamqp.com/api" | |
VHOST="<VHOST>" | |
__colored_echo() | |
{ | |
printf "\033[$1m$2\033[0m\n" | |
} |
NewerOlder