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
If: | |
- you add and commit with the wrong email address in git, and | |
- your remote has a hook set up to prevent you from pushing with the bad address | |
Then you need to amend the author of your commit before push can succeed: | |
1. fix your email address in git config: | |
$ git config user.name "Your 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
import os | |
import time | |
import json | |
class ConfigStore(): | |
config = {} | |
config_file = '' | |
defaults = { | |
'temp_desired': 75.0, |
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
openssl genrsa -aes256 -out private.key 2048 | |
openssl rsa -in private.key -out private.key | |
openssl req -new -days 1095 -key private.key -out cert.csr | |
openssl x509 -in cert.csr -out cert.cert -req -signkey private.key -days 1095 |
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
~/Projects/personal/railstest(master ✗) rails c | |
/home/theuser/.rvm/gems/ruby-2.4.1/gems/activerecord-5.2.0/lib/active_record/connection_adapters/connection_specification.rb:210:in `spec': undefined method `config' for #<Hash:0x00556a4a57fd28> (NoMethodError) | |
from /home/theuser/.rvm/gems/ruby-2.4.1/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:950:in `establish_connection' | |
from /home/theuser/.rvm/gems/ruby-2.4.1/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:60:in `establish_connection' | |
from /home/theuser/.rvm/gems/ruby-2.4.1/gems/activerecord-5.2.0/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>' | |
from /home/theuser/.rvm/gems/ruby-2.4.1/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval' | |
from /home/theuser/.rvm/gems/ruby-2.4.1/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook' | |
from /home/theuser/.rvm/gems/ruby-2.4.1/gems/activesupport-5.2.0/lib/ |
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
for line in `docker ps | awk ‘{print $1}’ | grep -v CONTAINER`; do docker ps | grep $line | awk ‘{printf $NF” “}’ && echo $(( `cat /sys/fs/cgroup/memory/docker/$line*/memory.usage_in_bytes` / 1024 / 1024 ))MB ; done |
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/bash | |
# | |
# Put this in a file called /usr/local/bin/vscode and then chmod +x it. | |
set -e | |
/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron "$@" & | |
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
// ==UserScript== | |
// @name Aced out GameServers.com Config editor | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description This script adds the ace editor to the config editor on gameservers.com | |
// @author digitalfiz <https://twitter.com/digitalfiz> | |
// @match https://my.gameservers.com/home/subscription_info.php?view=server_configuration&* | |
// @grant none | |
// ==/UserScript== |
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
for line in `docker ps | awk '{print $1}' | grep -v CONTAINER`; do docker ps | grep $line | awk '{printf $NF" "}' && echo $(( `cat /sys/fs/cgroup/memory/docker/$line*/memory.usage_in_bytes` / 1024 / 1024 ))MB ; done |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
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 Non-ASCII Font" : false, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { | |
"Red Component" : 0.5098039215686274, | |
"Color Space" : "Calibrated", | |
"Blue Component" : 1, | |
"Alpha Component" : 1, |
NewerOlder