I hereby claim:
- I am cecyc on github.
- I am cecyc (https://keybase.io/cecyc) on keybase.
- I have a public key whose fingerprint is 5DF6 FF0C BB24 64C5 2BBB 9FA5 FDD3 8E80 7EFF 118A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"fmt" | |
) | |
type Doggo struct { | |
Name string | |
Age int | |
} |
colorscheme desert | |
syntax enable "enable language specific syntax | |
set tabstop=4 "tabs are 4 spaces | |
set number "show line numbers on the right | |
set showcmd "show command at bottom | |
set wildmenu "show autocomplete options | |
set showmatch "highlight corresponding [{()}] | |
set laststatus=2 "always show status bar | |
set splitbelow "set split to bottom | |
set splitright "set split to right hand side |
#install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
#install apps | |
brew install --cask google-chrome | |
brew install --cask spotify | |
package main | |
import "fmt" | |
func main() { | |
for i := 0; i <= 500; i++ { | |
//Print the integer, the string of i (rune), and the bytes of i | |
fmt.Println(i, " - ", string(i), []byte(string(i))) | |
} |
How to copy a file in a remote onto your local machine:
scp REMOTE:FILENAME ./
REMOTE: where the file is FILENAME: the file you want to copy ./ where the file will be copied to (do not have to name it as it will use the name of the file in the remote
You can run a SQL query and pipe into a file on a remote location, then use method above to copy locally.
version: '2' #The Docker Compose file format version to be used | |
services: | |
database: #The name of the container, you can name this whatever you want. | |
image: mysql:latest #The image you are pulling into the container | |
environment: | |
MYSQL_ROOT_PASSWORD: tacos | |
MYSQL_DATABASE: tacos | |
MYSQL_USER: tacos | |
MYSQL_PASSWORD: tacos |
Sometimes when you try to run your file, you may get an error because the file is not in your Ruby path. You can:
Run irb -I.
to fix this but this is a pain. You could alias irb
to irb -I.
...
You could also use bundle console
to open irb with your gem code loaded (assuming that you _are_using bundler).
You could also...
task :console do
require 'irb'
Great talk on how webhooks work on a general level: https://vimeo.com/album/4045988/video/172433862
Set-up a webhook consumer like you would set-up any route in your app: http://cookieshq.co.uk/posts/how-to-receive-webhooks-in-your-ruby-on-rails-application/