Skip to content

Instantly share code, notes, and snippets.

View c0ze's full-sized avatar
🏠
Working from home

Arda Karaduman c0ze

🏠
Working from home
View GitHub Profile
#!/bin/bash
# Eddystone Scan by Arda Karaduman
# Based on ibeacon_scan by radius networks
# http://stackoverflow.com/questions/21733228/can-raspberrypi-with-ble-dongle-detect-ibeacons
if [[ $1 == "parse" ]]; then
packet=""
capturing=""
count=0
while read line
@c0ze
c0ze / jekyll-s3.rake
Last active April 4, 2020 13:53
deploys a jekyll site to s3 bucket. you must provide aws credentials in .env. Aws sdk v2 compatible. contains optional minifier and gzip.
require "aws-sdk"
require "dotenv"
require "reduce"
Dotenv.load
def local_dir; './_site'; end
def access_key; ENV['AWS_ACCESS_KEY']; end
def secret_key; ENV['AWS_SECRET_KEY']; end
@c0ze
c0ze / gist:a21e98018299b51b275c
Created June 30, 2015 06:49
A gist to unzip photos packed by google takeout and put them into folders by date
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)
### 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:
@c0ze
c0ze / deploy.sh
Created December 15, 2014 05:18
Deploy static version of Rails site to S3 bucket
#!/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