Skip to content

Instantly share code, notes, and snippets.

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

Phoomparin Mano heypoom

🏠
Working from home
View GitHub Profile
@heypoom
heypoom / spectre.c
Created January 7, 2018 09:24 — forked from Badel2/spectre.c
Spectre attack example implementation
/* https://spectreattack.com/spectre.pdf */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@heypoom
heypoom / build.gradle
Created January 15, 2018 08:04 — forked from chris-martin/build.gradle
Method for launching a Scala REPL for a Gradle project.
task classpath << { println sourceSets.main.runtimeClasspath.asPath }
function* CharStream(text) {
const lines = text.split('\n')
for (const row in lines) {
const chars = lines[row].split('')
for (const col in chars) {
yield {token: chars[col], row, col}
}
}
// จะทำอะไร?
// 1. ชื่อ "การกระทำ" (Action Name)
ADD_TODO = 'ADD_TODO'
// 2. ข้อมูลทั้งหมดของแอพ (State)
state = {todos: ['เลือกตั้ง']}
// 3. การกระทำ (Action)
action = {type: ADD_TODO, payload: 'เตะประยุทธ์'}
atom-text-editor {
text-rendering: optimizeLegibility;
}
atom-pane .mpe-preview webview {
// transform: scale(1.4) translate(100px, 100px);
}
.editor,
.pane,
version: '3.6'
services:
postgresql:
image: postgres:latest
volumes:
- ./storage/postgresql:/var/lib/postgresql/data
ports:
- 5432:5432
# --- Workspaces Management Commands ---
# ws: Manage Workspaces
ws() {
make -C "$HOME/Workspaces/$1" $2
}
# wg: Go to Workspace
wg() {
cd "$HOME/Workspaces/$1" || return
# --- Workspace Management Commands ---
# ws: Manage Workspaces
ws() {
make -C "$HOME/Workspaces/$1" $2
}
# wg: Go to Workspace
wg() {
cd "$HOME/Workspaces/$1" || return
main: start sh
down: stop
start:
docker-compose up -d
sh:
docker exec -it rin bash
stop:
Ensime@0.41.0
Hydrogen@2.4.1
MagicPython@1.0.12
Zen@0.18.0
activate-power-mode@2.7.0
advanced-open-file@0.16.8
aligner@1.2.4
aligner-css@1.2.1
aligner-javascript@1.3.0
aligner-php@1.2.0