Skip to content

Instantly share code, notes, and snippets.

View apolkingg8's full-sized avatar
🍊
ORANGGGGGEEEEE!!!

Eddie Hsu apolkingg8

🍊
ORANGGGGGEEEEE!!!
View GitHub Profile
@fnicollier
fnicollier / insertAtCaret.js
Created December 11, 2012 13:12
Insert text into a textarea at cursor position
//http://www.scottklarr.com/topic/425/how-to-insert-text-into-a-textarea-where-the-cursor-is/
function insertAtCaret(areaId,text) {
var txtarea = document.getElementById(areaId);
var scrollPos = txtarea.scrollTop;
var strPos = 0;
var br = ((txtarea.selectionStart || txtarea.selectionStart == '0') ?
"ff" : (document.selection ? "ie" : false ) );
if (br == "ie") {
txtarea.focus();
var range = document.selection.createRange();
@lsauer
lsauer / gist:5196979
Last active June 7, 2023 08:12
JavaScript List of selected MIME types (JSON)
//lsauer.com , lo sauer 2013
//JavaScript List of selected MIME types
//A comprehensive MIME List is available here: https://gist.github.com/lsauer/2838503
var mimeTypes =
{
'a' : 'application/octet-stream',
'ai' : 'application/postscript',
'aif' : 'audio/x-aiff',
'aifc' : 'audio/x-aiff',
'aiff' : 'audio/x-aiff',
@gaearon
gaearon / promise_scheduler.js
Last active March 29, 2018 06:12
Q promise concurrency limiter
'use strict';
var q = require('q');
/**
* Constructs a function that proxies to promiseFactory
* limiting the count of promises that can run simultaneously.
* @param promiseFactory function that returns promises.
* @param limit how many promises are allowed to be running at the same time.
* @returns function that returns a promise that eventually proxies to promiseFactory.
@jonathantneal
jonathantneal / README.md
Last active November 9, 2023 21:10
createElement.js // a 300 byte DOM Element creator

createElement.js

createElement.js lets document.createElement use CSS selectors.

This is a pretty useful library for building out DOM elements. The whole thing runs on one regex and a for loop, so it’s plenty fast. The script is 300 bytes when compressed and gzipped. For 524 bytes (advanced), it includes nesting support and can generate entire DOM hierarchies, including text nodes.

Usage

document.createElement(); // generates <div />
@brentvatne
brentvatne / gist:e1ca1e4beaf0135e3178
Last active September 11, 2015 03:46
Issue Triage

Goals

  • Close any issues that can be closed
  • Solve any issues that can be solved
  • Assign any outstanding issues to the correct members on the React Native team, and give them enough information to be able to act on them
  • Push pull requests through
  • Improve the signal:noise ratio
  • Be nice & welcoming, and appreciative to everyone's efforts to contribute

Process

@conancat
conancat / attictv.jobs.zh.md
Last active March 29, 2017 12:58
AtticTV 正在募集Web前端、後端兼職開發人員,以及UI與廣告設計人員。你可以隨時隨地、自由自在地工作。詳細資料如下!

誠徵:前端、後端開發人員,以及UI與廣告設計人員

SPOT News

職位:兼職/自由接案人員

  • 職務:前端、後端開發人員,以及UI與廣告設計人員
  • 若合作愉快,有機會轉正職!

責任:協助我們打造東南亞及亞太地區最棒的新聞應用程式!

@quellish
quellish / FBClasses.txt
Created August 15, 2015 01:50
Facebook iOS App Class List
headers:
_ASAsyncTransaction.h
_ASAsyncTransactionGroup.h
_ASDisabledPanUITextView.h
_ASDisplayLayer.h
_ASDisplayLayerDelegate-Protocol.h
_ASDisplayView.h
_ASImageNodeDrawParameters.h
_ASPendingState.h
_ASTextNodeCachedMetrics.h
@coodoo
coodoo / gist:59891964b06a603e2dc8
Created September 3, 2015 00:16
react isomorphic 原理
- 我想要挑戰isomorphic,但目前好像比較少redux配isomorphic又配上webpack的方案
- 這個範例可看,最近全部改寫過
- https://github.com/coodoo/react-redux-isomorphic-example
- 注意下面幾點
- js/bootClient.js 與 js/bootServer.js
- bootServer.js 負責做 server-render
@bparadie
bparadie / react-native.d.ts
Last active January 5, 2017 09:11
Incomplete react-native.d.ts, requires react.d.ts from DefinitelyTyped
declare module "react-native" {
import * as React from 'react';
import {ComponentClass, ReactType, ReactNode, ReactElement} from 'react';
export * from 'react';
/**
* Represents the completion of an asynchronous operation
* @see lib.es6.d.ts
@mqli
mqli / Few Line of Hack Code Make React-Native Run on Windows.md
Last active July 13, 2017 19:14
Few Line of Hack Code Make React-Native Run on Windows

#Few Line of Hack Code Make React-Native Run on Windows

While React-Native just add support of Android,yet officeally they just only support on OSX.

After a few hours of debugging, I find a simple way of let React-Native run on Windows.

Make sure all requirements were all setup following this:

Then initilize the project following this: