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 | |
# This script generates a static version of your rails site | |
# and uploads it into specified S3 bucket | |
# in this case the site had only two static pages, index.html and dashboard.html | |
# you need to configure these in routes.rb | |
# PS: if you know any other cleaner way to do this, pls let me know. | |
# this is necessary for setting up rbenv/rvm | |
source /Users/coze/.bash_profile |
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
### Keybase proof | |
I hereby claim: | |
* I am c0ze on github. | |
* I am coze (https://keybase.io/coze) on keybase. | |
* I have a public key whose fingerprint is 1E59 A9C5 7D0A A2FF E48F DF72 13BC 8AE4 E958 D3CC | |
To claim this, I am signing this object: |
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
require 'zip' | |
file_path = ARGV[0] | |
Zip::ZipFile.open(file_path) { |zip_file| | |
zip_file.each { |f| | |
date = f.name.split("/")[2].split(" ")[0] | |
name = f.name.split("/")[3] | |
p "date #{date} name #{name}" | |
f_path=File.join("GooglePhotos", date.split("-"), 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
find `pwd` -iname "*.go" -type f -exec sed -i '' 's:github.com/alecthomas/log4go:github.com/sujrd/log4go:g' {} + |
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
TARGETDIR="./out" | |
rm -rf $TARGETDIR | |
# copy html | |
for file in $(find . -type f -name \*.html); do | |
dir="./$TARGETDIR/$(dirname ${file})" | |
mkdir -p "$dir" | |
cp $file "$dir/$(basename ${file%.*}).html" |
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
sudo apt-get install libsndfile1 libsndfile1-dev libsamplerate0 libsamplerate0-dev libmpg123-0 libmpg123-dev cimg-dev |
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
cat ./* | grep ALLIANZ | awk '{print $9}' | sed 's/,//g' | awk '{s+=$1}END{print s}' |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDj91qUnVGoIikbkS03nX87nHk59+Iuw23tSabigZIaybc3qwft9ZYSrVmuOKuR/VeBPPQDE+rgiZ26RUI37JxZNZFK0WF2hasW4f+VpksoxOHmNJ8XCrJAZGnneJAVdN7x0z4dVY5RU7+hIlO7QHaSc1eAZ1TKZAIeyDWGZt6bnbRiOEzZWVDRYFXZycmbDFwHt4y+Dp/VjyAMsur5v+L+GKLoftk/HiWAHSF5o1o6saIiwfs0GBqr6n9sBCRsBSFBgqtl833mekMfW4O1627AkpBoRzOjxAkO/7j7qLaGIiEw7EhqmDQIVgj0cqureljRMQKDoez0Rgx00yiUGlGV akaraduman@gmail.com |
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
DOCKER=`which docker` | |
$DOCKER rm -v $($DOCKER ps -a -q -f status=exited) | |
$DOCKER rmi $($DOCKER images -f "dangling=true" -q) | |
$DOCKER volume rm $($DOCKER volume ls -qf dangling=true) |
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
;; Added by Package.el. This must come before configurations of | |
;; installed packages. Don't delete this line. If you don't want it, | |
;; just comment it out by adding a semicolon to the start of the line. | |
;; You may delete these explanatory comments. | |
(package-initialize) | |
(require 'package) ;; You might already have this line | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) |
OlderNewer