Skip to content

Instantly share code, notes, and snippets.

View erdemolkun's full-sized avatar

Erdem OLKUN erdemolkun

View GitHub Profile
@erdemolkun
erdemolkun / ImageMagick Asset Generator
Last active December 5, 2016 14:44
android_asset_generator.sh
printSimpleAndExit(){
echo "#simple usage ./asset_generator.sh <input.png> <output> <reference_ratio>"
exit 1
}
printError(){
echo "Error : $1"
}
@erdemolkun
erdemolkun / circle.yml
Created May 30, 2016 14:37
Circle CI Android Yml
#
# Build configuration for Circle CI
#
general:
artifacts:
- /home/ubuntu/starbucks-android/app/build/outputs/apk/
machine:
timezone:
@erdemolkun
erdemolkun / circle_ci_deploy.sh
Created May 30, 2016 14:36
Circle CI Release
#!/usr/bin/env bash
STARTTIME=$(date +%s)
HOCKEY_ID=$1
APK_NAME=$2
USE_RELEASE_NOTES=$3
printf "HOCKEY APPLICATION ID $HOCKEY_ID\n"
printf "BUILD APK NAME $APK_NAME\n"
#!/usr/bin/env bash
# Colors
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
COL_YELLOW=$ESC_SEQ"33;01m"
COL_BLUE=$ESC_SEQ"34;01m"
COL_MAGENTA=$ESC_SEQ"35;01m"
@erdemolkun
erdemolkun / bloomberg-bitbar.30s.sh
Last active May 6, 2016 13:23
Bitbar plugin for bloomberg TRY/USD exhcnage rates.
#!/bin/bash
# <bitbar.title>Show emoji</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Kent Karlsson</bitbar.author>
# <bitbar.author.github>vogonistic</bitbar.author.github>
# <bitbar.desc>Example of how to use emojis</bitbar.desc>
# <bitbar.image>http://i.imgur.com/z4T9X6G.png</bitbar.image>
# <bitbar.abouturl>https://github.com/matryer/bitbar-plugins/blob/master/Tutorial/emoji.sh</bitbar.abouturl>
require 'httparty'
require 'rubygems'
require 'json'
def bloom
begin
response = HTTParty.get 'http://www.bloomberght.com/dynamics/updateDynamicData'
jsonResult = JSON.parse(response)
#puts response
require 'httparty'
require 'nokogiri'
def enpara
response = HTTParty.get 'http://www.finansbank.enpara.com/doviz-kur-bilgileri/doviz-altin-kurlari.aspx'
doc = Nokogiri::HTML response
doc.css('#pnlContent span dl').each do |row|
if (row.css('dt').text)=="USD"
puts "#{row.css('dd').first.text.split(' ').first} : #{row.css('dd').last.text.split(' ').first}"
end
@erdemolkun
erdemolkun / enpara-bitbar.sh
Last active May 6, 2016 13:24
Bitbar plugin for Enpara.com TRY/USD exchange rates
#!/bin/bash
# <bitbar.title>Show emoji</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Kent Karlsson</bitbar.author>
# <bitbar.author.github>vogonistic</bitbar.author.github>
# <bitbar.desc>Example of how to use emojis</bitbar.desc>
# <bitbar.image>http://i.imgur.com/z4T9X6G.png</bitbar.image>
# <bitbar.abouturl>https://github.com/matryer/bitbar-plugins/blob/master/Tutorial/emoji.sh</bitbar.abouturl>