Skip to content

Instantly share code, notes, and snippets.

View inter-action's full-sized avatar
🤣
hahahaha

LightningStrike inter-action

🤣
hahahaha
  • coupang
  • beijing, China
View GitHub Profile
@inter-action
inter-action / android_instructions_23.md
Created September 29, 2018 11:24 — forked from agrcrobles/android_instructions_29.md
Setup Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

@inter-action
inter-action / master-javascript-interview.md
Created June 26, 2018 17:30 — forked from Geoff-Ford/master-javascript-interview.md
Eric Elliott's Master the JavaScript Interview Series
@inter-action
inter-action / centos6.5_nginx
Created January 15, 2018 09:42 — forked from ifels/centos6.5_nginx
centos 6.5 nginx安装与配置
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo:
cd /etc/yum.repos.d/
vim nginx.repo
填写如下内容:
[nginx]
name=nginx repo
@inter-action
inter-action / proxy.go
Last active November 13, 2017 04:14
golang http
// https://medium.com/@mlowicki/http-s-proxy-in-golang-in-less-than-100-lines-of-code-6a51c2f2c38c
package main
import (
"crypto/tls"
"flag"
"io"
"log"
"net"
"net/http"
"time"
@inter-action
inter-action / mobx-wx-binding.js
Created October 27, 2017 04:07
front end snippets
import {autorun, reaction} from 'mobx'
import store from '../store/index'
export default function(mapstore, mapaction, mapreaction){
if (!mapstore) throw new Error('invalid arguments: ', mapstore)
return function(target){
const app = getApp()
@inter-action
inter-action / golang-tls.md
Created October 20, 2017 06:07 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@inter-action
inter-action / bash-path-vars
Created September 8, 2017 02:15 — forked from caruccio/bash-path-vars
Path manipulation with bash vars
$ FILE=/some/path/to/file.txt
###################################
### Remove matching suffix pattern
###################################
$ echo ${FILE%.*} # remove ext
/some/path/to/file
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts
@inter-action
inter-action / ROBOMONGO-MONGDB-REMOTE-CONNECTION.MD
Created March 17, 2017 09:02 — forked from piraveen/ROBOMONGO-MONGDB-REMOTE-CONNECTION.MD
Setting up RoboMongo to connect with remote MongoDB server (VM, External Server)
import * as stream from 'stream'
export class BytesReader extends stream.Writable {
// todo: optionalize this
private _buffer = new Buffer(512 * 1024).fill(0)
private length = 0
private encoding: null | string = null
protected _write(chunk: any, encoding: string, callback: Function): void {
@inter-action
inter-action / IO.scala
Created August 17, 2016 15:22 — forked from jdegoes/IO.scala
A pedagogical implementation of the IO monad in Scala in 14 LOC
case class IO[A](unsafePerformIO: () => A) {
def map[B](ab: A => B): IO[B] = IO(() => ab(unsafePerformIO()))
def flatMap[B](afb: A => IO[B]): IO[B] =IO(() => afb(unsafePerformIO()).unsafePerformIO())
def tryIO(ta: Throwable => A): IO[A] =
IO(() => IO.tryIO(unsafePerformIO()).unsafePerformIO() match {
case Left(t) => ta(t)
case Right(a) => a
})
}
object IO {