Skip to content

Instantly share code, notes, and snippets.

View khanh96le's full-sized avatar

Khanh Quoc Le khanh96le

View GitHub Profile
<b style="font-size: 100px; font-family: Kaiti TC">
{{Hán tự}}
</b>
<hr id=answer>
<div id="target"></div>
<script type="text/javascript">
var characters = "{{Hán tự}}".split("").filter(char => char.trim() !== '');
{
"openapi" : "3.0.0",
"info" : {
"description" : "API for the configuration page",
"version" : "1.0.0",
"title" : "Story related APIs",
"contact" : {
"email" : "[email protected]"
},
"license" : {
@khanh96le
khanh96le / emoij.md
Last active January 20, 2020 08:13
Git commit emoij

EMOJI CHEAT SHEET Instant Search

People :bowtie: :smile: :simple_smile: :laughing: :blush: :smiley:

@khanh96le
khanh96le / tmux-cheatsheet.markdown
Last active October 24, 2019 02:54 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
// This is HL7 Message
message = "MSH|^~\&|MegaReg|XYZHospC|SuperOE|XYZImgCtr|20060529090131-0500||ADT^A01^ADT_A01|01052901|P|2.5\rEVN||200605290901||||200605290900\rPID|||56782445^^^UAReg^PI||KLEINSAMPLE^BARRY^Q^JR||19620910|M||2028-9^^HL70005^RA99113^^XYZ|260 GOODWIN CREST DRIVE^^BIRMINGHAM^AL^35209^^M~NICKELL’S PICKLES^10000 W 100TH AVE^BIRMINGHAM^AL^35200^^O|||||||0105I30001^^^99DEF^AN\rPV1||I|W^389^1^UABH^^^^3||||12345^MORGAN^REX^J^^^MD^0010^UAMC^L||67890^GRAINGER^LUCY^X^^^MD^0010^UAMC^L|MED|||||A0||13579^POTTER^SHERMAN^T^^^MD^0010^UAMC^L|||||||||||||||||||||||||||200605290900\rOBX|1|NM|^Body Height||1.80|m^Meter^ISO+|||||F\rOBX|2|NM|^Body Weight||79|kg^Kilogram^ISO+|||||F\rAL1|1||^ASPIRIN\rDG1|1||786.50^CHEST PAIN, UNSPECIFIED^I9|||A\r"
// And this is the JSON data
{
"info": {
"message_version": "2.7",
"message_type": "ADT_A01",
"message_description": "Admit/Visit Notification"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:id="@+id/txtEmailLogin"
android:layout_width="300dp"
android:layout_height="wrap_content"
import json
import requests
ID = 'AGGRCOW'
url = 'http://spojtoolkit.com/src-drivers/ExecuteCodeOnAPI-driver.php'
with open('{}.txt'.format(ID), 'r') as f:
input = f.read()
data = {
'problemId': '{}'.format(ID),
@khanh96le
khanh96le / Pointers.cpp
Last active June 19, 2018 02:57
C++ Pointers
myvar == 25
&myvar == 1776
foo == 1776
*foo == 25
// more pointers
#include <iostream>
using namespace std;
sqlalchemy.exc.IntegrityError: (_mysql_exceptions.IntegrityError) (1215, 'Cannot add foreign key constraint') [SQL: u'\nCREATE TABLE asker (\n\tcreated DATETIME NOT NULL, \n\tupdated DATETIME NOT NULL, \n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\temail VARCHAR(64) NOT NULL, \n\tfacebook_id VARCHAR(20), \n\tmicrosoft_id VARCHAR(50), \n\tpassword_hash VARCHAR(64), \n\tpassword_salt VARCHAR(16), \n\taccess_token_nonce VARCHAR(8) NOT NULL, \n\tnickname VARCHAR(32), \n\tgrade_id INTEGER, \n\tfree_credit_balance INTEGER NOT NULL, \n\tpaid_credit_balance INTEGER NOT NULL, \n\tpromotional_session_balance INTEGER NOT NULL, \n\tpurchased BOOL NOT NULL, \n\tcurrent_problem_id INTEGER, \n\tavatar VARCHAR(255), \n\tstatus INTEGER NOT NULL, \n\tphone VARCHAR(32), \n\tweighted_rank FLOAT NOT NULL, \n\tweighted_bid FLOAT NOT NULL, \n\tphone_verified BOOL NOT NULL, \n\tsource VARCHAR(255), \n\tip_address VARCHAR(100), \n\tbrowser_fingerprint VARCHAR(255), \n\tfullname VARCHAR(50), \n\tgoogle_id VARCHAR(50), \n\tpayment_met
@khanh96le
khanh96le / Permission denied when migrating database to Mysql - FlaskMigrate.md
Created April 26, 2018 05:41
Permission denied when migrating database to Mysql - FlaskMigrate

Error Logs

(env) ➜  platform_api git:(develop) python manage.py db upgrade
/Users/jerryle/Projects/gotit/platform_api/main/__init__.py:50: SyntaxWarning: import * only allowed at module level
  def _register_subpackages():
Traceback (most recent call last):
  File "manage.py", line 40, in <module>
    manager.run()
  File "/Users/jerryle/Projects/gotit/platform_api/env/lib/python2.7/site-packages/flask_script/__init__.py", line 412, in run
    result = self.handle(sys.argv[0], sys.argv[1:])