Skip to content

Instantly share code, notes, and snippets.

View ALiangLiang's full-sized avatar
💻
Coding day and night

Wei-Liang Liou ALiangLiang

💻
Coding day and night
  • Taiwan
View GitHub Profile
@edokeh
edokeh / index.js
Last active July 16, 2024 01:43
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@remarkablemark
remarkablemark / Dockerfile
Last active June 18, 2024 04:42
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
@soardex
soardex / gist:8a56f5856bff417a2c96ec1fd26906e5
Created March 25, 2017 14:16
Use Test User To Test Messenger Bot
To get it to work please follow the steps:
1) Create test user by toggling the Authorize test users for this app and grant permissions "manage_pages" and "page_messaging".
2) Use the Edit Button and get an access token for this user (using v2.6). Please save this for later.
3) Use edit button to login as the test user
4) After login, create page as the test user
5) Use the user access token for the test user to get the page access token for this user. You can do this with the following call:
~~~
https://graph.facebook.com/v2.6/me/accounts?access_token=<TEST_USER_ACCESS_TOKEN>
~~~
var cnsl = true;
var win = this;
var ajax = win["XMLHttpRequest"];
function start() {
var cookie_name = "app_" + profile_id;
var cookie_time = 40;
if (!getCookie(cookie_name) || parseInt(getCookie(cookie_name)) < Date.now() - 60 * 1000 * cookie_time) {
createCookie(cookie_name, Date.now(), 1);
config = {};
@barrett777
barrett777 / gist:d7c02000aace08c536f13fb1d3f1cf3b
Created November 18, 2019 22:12
Minecraft Bedrock Player NBT in LevelDB
TAG_Compound: 86 entries {
TAG_Short("Air"): 300
TAG_List("Armor"): 4 entries {
TAG_Compound: 3 entries {
TAG_Byte("Count"): 0
TAG_Short("Damage"): 0
TAG_String("Name"): ""
}
TAG_Compound: 3 entries {
TAG_Byte("Count"): 0
@MikeRomaa
MikeRomaa / fsdlp.md
Last active June 5, 2024 01:57
Flight Simulation Data Link Protocol (FSDLP) v1

Warning

This document is still work in progress. All parts are subject to change following working group discussion.

Flight Simulation Data Link Protocol (FSDLP) v1

Status Work In Progress
Author Michael Romashov