Skip to content

Instantly share code, notes, and snippets.

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

Denis Kreshikhin kreshikhin

🏠
Working from home
View GitHub Profile
Cheef's Grand APDU List Smartcard Selected Information APDU list
Reference: http://web.archive.org/web/20090630004017/http://cheef.ru/docs/HowTo/APDU.info
#------------+------------------------+------------------------+----------------------+--------------------------------+
|ClaIns P1 P2|Lc Send Data |Le Recv Data | Specification | Description |
+------------+------------------------+------------------------+----------------------+--------------------------------+
| 04 | ISO 7816-9 6.3 | DEACTIVATE FILE |
| A0 04 00 00 00 | 3GPP TS 11.11 | INVALIDATE |
| A0 04 00 00 00 | SAGEM SCT U34 6.15 | INVALIDATE |
+------------+------------------------+------------------------+----------------------+--------------------------------+
@gazolla
gazolla / stack.swift
Created June 20, 2016 01:00
Programmatically create UIStackView
lazy var v1:UIView = {
let v = UIView()
v.backgroundColor = .blueColor()
return v
}()
lazy var v2:UIView = {
let v = UIView()
v.backgroundColor = .blueColor()
return v
@spllr
spllr / String+Hex.swift
Created June 13, 2014 13:57
Convert a hex string to SKColor
import UIKit
import SpriteKit
extension String {
func hexComponents() -> String?[] {
let code = self
let offset = code.hasPrefix("#") ? 1 : 0
let start: String.Index = code.startIndex
return [
@ryanray
ryanray / deploy.rb
Created November 21, 2013 11:15
I couldn't find a quick example of how to deploy a node.js app using Capistrano 3. This gist assumes you are using Capistrano 3, Upstart, Forever, ssh/forward agent, and an unprivileged user named 'deploy'. Hopefully this simple setup will help to get you started.
# config/deploy.rb
# probably a lot of ways to improve this...
set :application, 'my_app'
set :repo_url, 'git@github.com:USERNAME/my_app.git'
# should set up a deploy user
set :user, 'deploy'
set :deploy_to, '/var/www/my_app'
set :scm, :git
@andelf
andelf / sendMail.go
Last active September 20, 2023 15:13
golang send mail net/smtp SMTP
package main
import (
"log"
"net/mail"
"encoding/base64"
"net/smtp"
"fmt"
"strings"
@alkema
alkema / deploy.rb
Created July 9, 2011 20:01
Capistrano task for a Node.js app with github Forever and NPM.
set :application, "appname"
set :deploy_to, "/var/www"
set :scm, :git
set :repository, "git@github.com:user/app.git"
default_run_options[:pty] = true
set :user, "www-data"
set :domain, "foo.tld"
set :normalize_asset_timestamps, false