Run script to activate F1 to select alt F2 to choose a tab.
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 nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
set tags=./tags; | |
set shiftwidth=2 | |
command NE NERDTree | |
set number |
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 GEM_HOME=$HOME/gem | |
export RUBYLIB=$HOME/lib | |
export PATH=$PATH/bin:$PATH | |
PATH=$PATH:$HOME/.local/bin:$GEM_HOME/bin:$RUBYLIB:$HOME/bin | |
export 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
openssl genrsa -des3 -out example.com.key 2048 | |
openssl rsa -in example.com.key -out example.com.key.nopass | |
openssl req -new -key example.com.key.nopass -out example.com.csr | |
cat example_com.crt PositiveSSLCA2.crt AddTrustExternalCARoot.crt > example.com.crt | |
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 random path use SecureRandom | |
SecureRandom.uuid | |
Rails.application.config.assets.prefix = "../custom_assets" | |
Rails.application.config.assets.manifest = File.join(Rails.public_path, Rails.application.config.assets.prefix) |
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
checking folder space in unix / linux | |
sudo du -h --max-depth=1 |
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
path = "/home/raven/Downloads/linkedin_connections_export.vcf" | |
lines = File.read(path).split("\n") | |
a = [] | |
lines.split("BEGIN:VCARD").each do |line| | |
if !(line.empty?) | |
data = "BEGIN:VCARD\r\n" + line | |
v = VCardigan.parse(data) | |
puts v.fn.first.values.first | |
puts v.email.first.values.first |
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 | |
function generate_ssl_cert { | |
cert_name=$1 | |
( | |
openssl genrsa -des3 -out ${cert_name}.key 1024 | |
openssl rsa -in ${cert_name}.key -out ${cert_name}.pem | |
openssl req -new -key ${cert_name}.pem -out ${cert_name}.csr | |
openssl x509 -req -days 365 -in ${cert_name}.csr -signkey ${cert_name}.pem -out ${cert_name}.crt |
I added two verified email addresses to AWS SES so that I could send emails from/to them while in the SES Sandbox.
class UserMailer < ApplicationMailer
default from: '[email protected]'