Skip to content

Instantly share code, notes, and snippets.

View bestpika's full-sized avatar

観月唯 bestpika

  • やりたい事しかできない
View GitHub Profile
@bestpika
bestpika / vscode.md
Last active September 24, 2016 14:09
$ npm install -g typings
$ typings install dt~node dt~express --global --save
<?php
// https://developer.mozilla.org/zh-TW/docs/HTTP/Access_control_CORS
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Max-Age: 86400'); // day
header('Access-Control-Allow-Credentials: true');
}
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
@bestpika
bestpika / 7688.md
Last active September 29, 2016 01:45

MTK 7688 (DUO)

rootfs

$ opkg update
$ opkg install block-mount kmod-fs-ext4 kmod-usb-storage-extras e2fsprogs
$ mkfs.ext4 /dev/mmcblk0p1

init.d

#!/bin/sh /etc/rc.common

START=999

start() {
    sleep 30
    # . /etc/profile
 # echo $PATH
@bestpika
bestpika / hack.cs
Last active April 19, 2016 07:39
功能筆記
// 清除空白、換行
public static string clear(string text)
{
var cls = new[] { "\r", "\n", " ", " " };
foreach (var cl in cls)
{
text = text.Replace(cl, string.Empty);
}
return text.Trim();
}
@bestpika
bestpika / README.md
Created January 11, 2016 00:36
系統安全軟體
@bestpika
bestpika / README.md
Last active January 8, 2016 01:32
JavaScript Maps
@bestpika
bestpika / README.md
Last active April 22, 2016 08:48
登入