Skip to content

Instantly share code, notes, and snippets.

View up1's full-sized avatar

Somkiat Puisungnoen up1

View GitHub Profile
@up1
up1 / checking.swift
Last active March 15, 2016 15:38
Swift 2.2
#if swift(>=2.2)
for counter in 0 ..< 5 {
}
#else
for var counter=0; counter < 5; counter++ {
}
#endif
@up1
up1 / Jenkinsfile
Last active March 18, 2016 06:21
Jenkins 2.0 preview
node {
stage 'Build'
sh './gradlew assemble'
stage 'Test'
sh './gradlew test'
}
@up1
up1 / note
Created March 19, 2016 03:26
Lab haskell at SPRINT3R
== Hello World ==
module Main where
main :: IO()
main = do
putStrLn "Hello World"
Compile and Executable
$ghc -o hello hello.hs
@up1
up1 / first.php
Created March 21, 2016 16:16
Coding Standard
//Choice A
function hello() {
//TODO
}
//Choice B
function hello()
{
//TODO
}
@up1
up1 / Dockerfile
Created March 23, 2016 12:12
Docker Ecosystem
FROM python:2.7
ADD . /src
WORKDIR /src
RUN pip install -r requirements.txt
@up1
up1 / Appfile
Last active March 29, 2016 14:24
Android with Fastlane
json_key_file "google_play.json"
package_name "up1.gradecalculator"
@up1
up1 / product.json
Last active March 31, 2016 02:56
Demo WireMock
{
"request": {
"urlPattern": "/products",
"method": "GET"
},
"response": {
"status": 200,
"headers":
{
"Content-Type" : "application/json"
@up1
up1 / Fastfile01
Last active April 2, 2016 11:04
Demo Fastlane for iOS app
desc "Creating a code signing certificate and provisioning profile"
lane :provision do
produce
cert
sigh(force: true)
end
@up1
up1 / Action.swift
Last active April 3, 2016 05:56
Demo Redux
protocol ActionType {
init()
}
struct DefaultAction : ActionType {
init() { }
}
protocol StandardAction : ActionType {
var type: String { get }
@up1
up1 / call_function.txt
Last active April 3, 2016 11:41
Swift vs Kotlin
//Swift
isLogin("somkiat", password: "1234")
//Kotlin
isLogin("somkiat", "1234")