- download RASPBIAN from http://www.raspberrypi.org/downloads/. Download with torrent. Direct download usually fails (without any warning in Chrome! File size will be differ if download fails in the middle but there's no size to check in the download website!).
- And it's a good idea to check SHA1 of the zip file first. (e.g.
openssl sha1 2014-01-07-wheezy-raspbian.zip
) - format SD card as FAT-32
- run
df -h
, find disk location. e.g./dev/disk2s4", add r and remove s4 "/dev/rdisk2
- write the image file into SD card with command
sudo dd bs=1m if=2014-01-07-wheezy-raspbian.img of=/dev/rdisk2
https://www.andrewmunsell.com/blog/getting-started-raspberry-pi-install-raspbian - plug in HDMI before turn on RPi or else display will not work. If forgot, do NOT pull the power to restart right away. Wait for some time (about 3 min) for RPi to finish setting up its keys and stuff. Otherwise you will
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 | |
# TestFlight-upload.sh | |
# https://gist.github.com/hlung/7818585 | |
# | |
# By Thongchai Kolyutsakul @hlungx | |
# Version: v1.0.3 - 27 Oct 2014 | |
# | |
# Requirement: Shenzhen (https://github.com/nomad/shenzhen) | |
# |
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
// | |
// MapValueExample.swift | |
// ViKi | |
// | |
// Created by Thongchai Kolyutsakul on 29/5/17. | |
// | |
// | |
import Foundation | |
import SwiftyJSON |
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
# ::: Dvorak - Vimium Custom key mappings ::: | |
# NOTE: This *unmaps* all keys and only adds frequently used ones. | |
# It mainly uses left hand keys so you don't have to let go of the mouse. | |
# How to use: open Vimium option screen, put this in "Custom key mappings" section. | |
unmapAll | |
# Link | |
map u LinkHints.activateMode | |
map U LinkHints.activateModeToOpenInNewTab |
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
#pragma mark - GCDAsyncSocketDelegate | |
- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port { | |
[self secureSocket:sock]; | |
} | |
// We are connecting to server with self-signed certificate and don't include the certificate | |
// (public key .pem) in the client. So we skip all the cert checking. To actually check, see | |
// http://stackoverflow.com/questions/9874932/ssl-identity-certificate-to-run-an-https-server-on-ios | |
- (void)secureSocket:(GCDAsyncSocket *)sock { | |
// It has been changed in CocoaAsyncSocket v7.4, some old option keys are now unavailable and will throw exception. | |
// Use GCDAsyncSocketManuallyEvaluateTrust and evaluate in -socket:didReceiveTrust: delegate instead. |
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
// | |
// UIRefreshControl+beginRefreshing.h | |
// Kibo | |
// | |
// Created by Hlung on 3/6/15. | |
// MIT License | |
// | |
#import <UIKit/UIKit.h> |
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
package com.raywenderlich.pokelist | |
import kotlinx.serialization.Serializable | |
@Serializable | |
data class Pokemon( | |
val name: String, | |
val url: String | |
) | |
@Serializable |
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
package com.raywenderlich.pokelist | |
import com.raywenderlich.pokelist.shared.ApplicationDispatcher | |
import com.raywenderlich.pokelist.shared.Image | |
import io.ktor.client.HttpClient | |
import io.ktor.client.request.get | |
import kotlinx.coroutines.GlobalScope | |
import kotlinx.coroutines.launch | |
import kotlinx.serialization.json.Json |
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
import UIKit | |
import app | |
class PokeListViewController: UIViewController { | |
@IBOutlet var pokemonSprite: UIImageView! | |
@IBOutlet var pokemonInfo: UILabel! | |
@IBOutlet var pokeListTableView: UITableView! | |
internal var pokeList: [PokemonEntry] = [] | |
internal var api = PokeApi() |