This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const setGlobalVars = require('indexeddbshim'); | |
(global as any).window = global; // We'll allow ourselves to use `window.indexedDB` or `indexedDB` as a global | |
setGlobalVars(); // See signature below | |
(window.indexedDB as any).__setConfig({ | |
checkOrigin: false, | |
}); | |
const Dexie = require('dexie'); | |
var db = new Dexie('friend_database'); | |
db.version(1).stores({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//to use standard input/output | |
#include <iostream> | |
//to use ofstream | |
#include <fstream> | |
//to use thread class | |
#include <thread> | |
//to use mutex lock | |
#include <mutex> | |
//to use vector | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var type_a = { | |
"questions": [ | |
{ | |
"id": 1, | |
"order": 1, | |
"correct_answer": 1, | |
"question": { | |
"en": "[EN] 2017년 트위터에 140자였던 글자 제한이 어떻게 되었는가?", | |
"th": "[TH] 2017년 트위터에 140자였던 글자 제한이 어떻게 되었는가?" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void execute(int n, int total) { | |
printf("loop count : %d/%d\n", n, total); | |
} | |
int loop_core(int *root_addr, int *prev_addr, int num) { | |
int base_value = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOG_FILE=/tmp/touchpad-enable-log | |
XINPUT_ID=`xinput list|grep Touchpad|awk '{print $5}'|cut --delimiter="=" -f 2` | |
function enable_touchpad() { | |
#/usr/bin/synclient TouchpadOff=0 | |
xinput --enable $XINPUT_ID | |
echo "touchpad_enable\t:`date`" >> $LOG_FILE | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter Cramming | |
// @description Force enable cramming (280 character tweets) on Twitter | |
// @author Prof. 9 | |
// @version 0.2 | |
// @match https://twitter.com/* | |
// @run-at document-idle | |
// @namespace prof9.twittercramming | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
namespace Assets.GameExternal.Scripts { | |
public class EffectGizmo : MonoBehaviour { | |
public enum Types { | |
Sphere, | |
DirectionX, | |
DirectionY, | |
DirectionZ, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
https://twitter.com/k2pa00/status/737300123332419585 | |
execute | |
$ gprolog | |
['contradiction.pl']. | |
sol_a(A, B, C, D). | |
sol_b(A, B, C, D). | |
sol_c(A, B, C, D). | |
sol_d(A, B, C, D). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <cstring> | |
class BrokenMemory { | |
public: | |
static BrokenMemory *Get(); | |
public: | |
BrokenMemory() : data_("EPIC FAIL") {} | |
const char *data() const { return data_.data(); } | |
private: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
printf(%s) with null pointer | |
## Execute | |
$ clang test_format_null.c && ./a.out | |
## Output | |
### OSX | |
|(null)||(nu| |