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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "ruby_lsp", | |
"name": "Rails", | |
"request": "launch", | |
"program": "${workspaceRoot}/bin/rails s", | |
"env": { | |
"RAILS_ENV": "development" |
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
{ | |
"workbench.colorTheme": "Spinel", | |
"workbench.colorCustomizations": { | |
"[Spinel]": { | |
"statusBar.background": "#CC0000", | |
"statusBar.noFolderBackground": "#CC0000", | |
"statusBar.debuggingBackground": "#CC0000" | |
} | |
} | |
} |
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
ruby -run -e httpd . -p 8080 |
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
from diagrams import Diagram, Cluster | |
from diagrams.aws.compute import EC2 | |
from diagrams.aws.database import RDS | |
from diagrams.aws.network import ELB | |
from diagrams.onprem.inmemory import Redis | |
with Diagram("Web Service", show=False) as diag: | |
with Cluster("Compute"): | |
web_1 = EC2("web 1") | |
web_2 = EC2("web 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
{ | |
"recommendations": [ | |
"aliariff.vscode-erb-beautify", | |
"aki77.rails-db-schema", | |
"shopify.ruby-extensions-pack" | |
] | |
} |
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
export function Cable() { | |
function _initSocket({ | |
url = "ws://localhost:4080/cable", // Take from config | |
onOpen, | |
onClose, | |
onError, | |
onMessage, | |
}) { | |
Cable.socket = new WebSocket(url); | |
Cable.socket.onopen = onOpen; |
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
DOMAIN_NAME="my.web.site"; | |
PROJECT_ID="my-gcp-project-id"; | |
# create bucket of domain name | |
gsutil mb -p $PROJECT_ID -b on gs://$DOMAIN_NAME | |
# set index file | |
gsutil web set -m index.html gs://$DOMAIN_NAME | |
# set error file |
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
# Set your app name - the Chromium Browser (i.e Chrome, Brave) in a variable. | |
appName="Brave" | |
# Get the bundle Id of the Chromium Browser, store it in a variable. | |
bundleID=$(osascript -e 'id of app "'$appName'"') | |
# Example: Get the bundle Id of Brave browser | |
# Returns: | |
# com.brave.Browser |
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 hashlib | |
passwd = "mywalletpassword" | |
salt = "summersaltstringwhichislong" | |
p = 1 | |
r = 8 | |
n = 262144 | |
dklen = 32 | |
dec_key = hashlib.scrypt(bytes(passwd, 'utf-8'), salt=bytes.fromhex(salt), n=n, r=r, p=p, maxmem=2000000000, dklen=dklen) | |
print(dec_key) |
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
[core] | |
editor = vi | |
[alias] | |
spull = !git-svn fetch && git-svn rebase | |
spush = !git-svn dcommit | |
send = !git spull && git spush | |
up = pull --rebase | |
on = push origin master | |
co = checkout |
NewerOlder