Skip to content

Instantly share code, notes, and snippets.

Avatar
🐜
ant has power

hacke2 hacke2

🐜
ant has power
View GitHub Profile
View procedural-abstraction.ts
// data version
type DraftPost = {
kind: 'DraftPost';
content: string;
};
type ReviewingPost = {
kind: 'ReviewingPost';
content: string;
@superhos
superhos / douyin.html
Created Dec 14, 2018
douyin logo style
View douyin.html
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@oliveratgithub
oliveratgithub / emojis.json
Last active Nov 26, 2020
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
View emojis.json
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z
@wintercn
wintercn / lightpromise.js
Last active May 30, 2019
一组小清新的promise风格小函数
View lightpromise.js
function get(uri) {
return http(uri,'GET');
}
function post(uri,data) {
if(typeof data === 'object' && !(data instanceof String || (FormData && data instanceof FormData))) {
var params = [];
for(var p in data) {
if(data[p] instanceof Array) {
for(var i = 0; i < data[p].length; i++) {
params.push( encodeURIComponenet(p) + '[]=' + encodeURIComponenet(data[p][i]);
@puterjam
puterjam / compare_version.js
Created Jan 20, 2014
判断版本号大小
View compare_version.js
/**
* 判断两个版本字符串的大小
* @param {string} v1 原始版本
* @param {string} v2 目标版本
* @return {number} 如果原始版本大于目标版本,则返回大于0的数值, 如果原始小于目标版本则返回小于0的数值。0当然是两个版本都相等拉。
*/
function compareVersion(v1, v2) {
var _v1 = v1.split("."),
_v2 = v2.split("."),
@dignifiedquire
dignifiedquire / adapter.js
Last active Nov 8, 2016
Example of using connect with ejs templating and browserify.
View adapter.js
exports.upcase = function(name) {
return name.toUpperCase();
};
You can’t perform that action at this time.