Skip to content

Instantly share code, notes, and snippets.

Avatar

観月唯 bestpika

  • やりたい事しかできない
View GitHub Profile
View blynk.yml
version: '2'
services:
db:
image: postgres:alpine
restart: always
volumes:
- ./postgres:/var/lib/postgresql/data
ports:
- 5432:5432
View 00.md

IIS

  • 解鎖設定
%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/serverRuntime
@bestpika
bestpika / arduino.ino
Last active Jul 1, 2018
#arduino 網址解碼
View arduino.ino
// 文字轉換
unsigned char hs2i(char c)
{
if ('0' <= c && c <= '9') {
return ((unsigned char)c - '0');
} else if ('a' <= c && c <= 'f') {
return ((unsigned char)c - 'a' + 10);
} else if ('A' <= c && c <= 'F') {
return ((unsigned char)c - 'A' + 10);
} else {
@bestpika
bestpika / Web.config
Last active Jun 25, 2018
IIS 7.x static content
View Web.config
<configuration>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
<remove name="RoleManager" />
<remove name="UrlAuthorization" />
<remove name="DefaultAuthentication" />
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
<add name="RoleManager" type="System.Web.Security.RoleManagerModule" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
@bestpika
bestpika / 0.md
Last active Mar 28, 2018
CentOS 6, 7
View 0.md
@bestpika
bestpika / MarqueeTextView.java
Last active Mar 16, 2017
Android MarqueeTextView
View MarqueeTextView.java
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.TypedValue;
public class MarqueeTextView extends android.support.v7.widget.AppCompatTextView {
private Paint paint = null;
private float x = 0.0f;
private float y = 0.0f;
@bestpika
bestpika / a.js
Last active Feb 3, 2017
在 ajax 送出 post 前加上 token #mvc #ajax
View a.js
$.ajaxPrefilter((o) => {
if (o.type.toLowerCase() == 'post' && o.contentType.toLowerCase().includes('x-www-form-urlencoded')) {
var d = o.data.split('&'); // data
var i = $('input[name="__RequestVerificationToken"]:first'); // one
if (i.length > 0) {
var n = i.attr('name');
var v = encodeURIComponent(i.val());
var k = n + '=' + v;
d.push(k);
o.data = d.join('&');
View tfl.md

交控平台


系統安裝

  • 燒錄映像檔
  • 修改 /config.txt
  • 安裝開機