Skip to content

Instantly share code, notes, and snippets.

View qrtt1's full-sized avatar
🎯
Focusing

Ching Yi, Chan qrtt1

🎯
Focusing
View GitHub Profile

本來打算試著用 ngx_lua 取代原本用 C 實作的 access control,可是看完了「基本語法」想要找一些相關會用到的 library 都找不太到,像 lua-aws 雖然有人寫,但看起來不太完整。這樣就不能透過 lua script 存取 aws service 取得認證的資訊。

不過,想了想它網頁上 access_by_lua 的例子也沒有直接寫在裡面,就以 deleagte 的形式問了其它 uri:

location / {
    deny    192.168.1.1;
    allow   192.168.1.0/24;
    allow   10.1.1.0/16;
    deny    all;

Archlinux Quick Note

太久沒有安裝 Archlinux 現在的安裝方式回到以前「復古」的感覺,有點像以前還沒有 GUI 安裝模式的 debian 那般。還好有人做了 Install Script,我主要記錄我卡關的部分。

Partition

目標是安裝在 VM 內(目前使用的是 vmware fushion)預設沒有開 EFI 模式的,所以我以 BIOS/MBR 的模式來規劃。(因為先前都沒先檢查,以為它是 EFI 結果 bootloader 都裝失敗)

主要參考的是 beginners' guide(雖然我有點懷疑,Beginner 是否能看懂這份文件),進入 parted 後要先執行下列指令,作為 BIOS 開機的準備:

批踢踢實業坊›看板 Soft_Job關於我們聯絡資訊
返回看板分享
作者NewSpec (新規格)
看板Soft_Job
標題[請益] 如何學習C/C++並能使之成為應職技能?
時間Mon Feb 9 16:06:49 2015
這個問題我老早就想請教各位版大了
pkg_check_modules(PC_LIBAO REQUIRED ao)
if(CMAKE_CROSSCOMPILING)
find_path(LIBAO_INCLUDE_DIR
NAMES
ao/ao.h
PATHS
${PC_LIBAO_INCLUDE_DIRS}
NO_DEFAULT_PATH
)
@qrtt1
qrtt1 / azure_extra_disk.yml
Created December 22, 2014 05:50
mount data disk
---
- name: mount data disk
mount: name=/opt src=/dev/sdc1 fstype=ext4 state=mounted
register: try_mount_disk
ignore_errors: True
- command: parted -s /dev/sdc mklabel gpt
when: try_mount_disk | failed
- command: parted -s /dev/sdc mkpart primary ext4 0 100%
#!/usr/bin/python
import json
import sys
inventory = {}
inventory['www'] = {}
inventory['www']['hosts'] = ['aaa.bbb.ccc.ddd']
if "--host" in sys.argv:
批踢踢實業坊›看板 Soft_Job關於我們聯絡資訊
返回看板分享
作者chaming (無與倫比的熱情)
看板Soft_Job
標題[徵才] 年薪百萬徵後端工程師/Android高手
時間Tue Nov 25 16:26:19 2014
年薪百萬徵Backend Developer/Android高手

檢視基本資料

qty:JCConf qrtt1$ ffprobe 20141115153142.MTS
ffprobe version 0.9.4, Copyright (c) 2007-2014 the FFmpeg developers
  built on Oct 21 2014 20:23:25 with clang 6.0 (clang-600.0.51)
  configuration: --prefix=/opt/muzee --disable-yasm --disable-doc --disable-avfilter
  libavutil    51. 32. 0 / 51. 32. 0
  libavcodec   53. 42. 4 / 53. 42. 4
 libavformat 53. 24. 2 / 53. 24. 2
import org.apache.commons.lang.StringUtils;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.api.java.function.Function;
import org.apache.spark.api.java.function.Function2;
import org.apache.spark.api.java.function.PairFunction;
import scala.Tuple2;
%{
#include "parser.h"
%}
%%
[ \t\n\r]+ {return ACTION_SKIP;}
"PLAY" {return ACTION_PLAY;}
"STOP" {return ACTION_STOP;}
"SEEK" {return ACTION_SEEK;}