Skip to content

Instantly share code, notes, and snippets.

View thanhlmm's full-sized avatar
🔥
On fire

Thanh Le thanhlmm

🔥
On fire
View GitHub Profile
@thanhlmm
thanhlmm / js
Created April 26, 2016 16:07
Get User Token
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
var accessToken = response.authResponse.accessToken;
}
} );
static-html-server -p [port] -r [root folder] -f [fallback path if not found]
@thanhlmm
thanhlmm / page_list
Created April 27, 2016 07:47
Get Page list of this user
GET /v2.6/{user-id}/accounts HTTP/1.1
Host: graph.facebook.com
<div class="myApp" ng-controller="myAppCtrl">
<form ng-submit="sendData">
<h3>Ten Cua ban</h3>
<input type="text" ng-model="fields.name">
</form>
</div>
<style>
.myApp {
background-color: green;
}
[
{
data1: abc,
data2: abc
},
{
data1: def,
data2: def
},
{
@thanhlmm
thanhlmm / translater.md
Created August 22, 2016 14:40
Other languages to Scala

const in JS => val

function in JS => def

@thanhlmm
thanhlmm / EventEmitter.js
Created November 1, 2016 10:11
Hiện thực thử EventEmitter của CuThanh
"use strict"
class EventEmitter {
constructor() {
this.listener = []
}
addListener(event, listener) {
if (this.listener[event]) {
this.listener[event].push(listener)
} else {
this.listener[event] = Array(listener)
@thanhlmm
thanhlmm / getCaptchaVitteo.php
Created November 2, 2016 02:16
From CuThanh.com with </3
<?php
function _curl($url, $post = "", $cookie, $ref)
{
$ch = curl_init();
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
if ($cookie) {
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
@thanhlmm
thanhlmm / animate.json
Created September 13, 2021 09:52
Lottie
{"v":"5.5.8","fr":60,"ip":0,"op":240,"w":1000,"h":1000,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 14","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":153,"s":[0]},{"t":223,"s":[160]}],"ix":10},"p":{"a":0,"k":[553.471,524.289,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":153,"s":[0,0,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":186,"s":[511.29,511.29,100]},{"t":223,"s":[0,0,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0,-10.644],[1.985,-1.985],[10.644,0],[1.985,1.985],[0,10.644],[-1.985,1.985],[-10.644,0],[-1.985,-1.985]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty
@thanhlmm
thanhlmm / App.jsx
Created September 18, 2021 13:21
React props spread
const a = {
foo: "bar"
};
<Hello {...a} />
<Hello foo="bar" />