Skip to content

Instantly share code, notes, and snippets.

View klrkdekira's full-sized avatar

Chee Leong klrkdekira

View GitHub Profile
@klrkdekira
klrkdekira / iconresizer.sh
Last active August 29, 2015 14:01
IOS icon resize (ImageMagick)
#!/bin/bash
f=$(pwd)
convert "${f}/${1}" -resize 57x57 "${f}/icon.png"
convert "${f}/${1}" -resize 114x114 "${f}/icon@2x.png"
convert "${f}/${1}" -resize 60x60 "${f}/icon-60.png"
convert "${f}/${1}" -resize 120x120 "${f}/icon-60@2x.png"
convert "${f}/${1}" -resize 72x72 "${f}/icon-72.png"
convert "${f}/${1}" -resize 144x144 "${f}/icon-72@2x.png"
convert "${f}/${1}" -resize 76x76 "${f}/icon-76.png"
convert "${f}/${1}" -resize 152x152 "${f}/icon-76@2x.png"
@klrkdekira
klrkdekira / splashresizer.sh
Created May 8, 2014 08:13
IOS splash resizer (ImageMagick)
#!/bin/bash
f=$(pwd)
convert "${f}/${1}" -resize 320x480 "${f}/Default~iphone.png"
convert "${f}/${1}" -resize 640x960 "${f}/Default@2x~iphone.png"
convert "${f}/${1}" -resize 640x1136 "${f}/Default-568h@2x~iphone.png"
@klrkdekira
klrkdekira / gist:4257faa58b03fb2edf59
Created June 16, 2014 07:38
AngularJS JQuery Hackish Example
$("button").click(function () {
// Do something here
$scope.$apply();
});
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, sessionmaker, scoped_session
DBSession = scoped_session(sessionmaker())
Base = declarative_base()
class Words(Base):
__tablename__ = 'words'
word = Column(String, primary_key=True)
package main
import (
"fmt"
)
package main
import (
"fmt"
"time"
)
func main() {
for i := 1; i <= 100; i++ {
go fizzbuzz(i)
package main
import (
"fmt"
"sync"
)
package main
import (
"fmt"
"runtime"
"sync"
)
func main() {
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"sync"
)