Skip to content

Instantly share code, notes, and snippets.

View string.md

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@andyyou
andyyou / upload.js
Created Apr 15, 2016 — forked from claudiopetrini/node_upload.js
Node.js file upload on Stamplay
View upload.js
'use strict';
const request = require('request');
const fs = require('fs');
var formData = {
image: fs.createReadStream(__dirname + '/claudio.jpg'),
};
request.post({
@andyyou
andyyou / contest.md
Created Dec 14, 2015 — forked from brentvatne/contest.md
React.js Conf Contest
View contest.md

React.js Conf tickets, everyone wants them but we only have space for 400 people, and that includes speakers, organizers and everyone’s proud parents and grandparents! If you are into speaking and have time before December 13th, you should submit a 30 minute talk or 5 minute lightning talk proposal. If you’re more into writing than speaking or coding, ReactJSNews is giving away 1 ticket for the best blog post submission. But you probably like programming, so React Native Newsletter & Exponent are giving away two tickets for the best React Native apps made with Exponent! Of course, if you like speaking, writing and programming you should do all of the above.

Details of the contest

  • You make an “app” and publish it to Exponent. You don’t have to open source it, but people
View Few Line of Hack Code Make React-Native Run on Windows.md

#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:

@andyyou
andyyou / iterm2-solarized.md
Created Sep 30, 2015 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)
View sublime_text3_crack.md

All binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

Sublime Text 3, build 3083 (dev) for Windows x64

OFFSET ORIGINAL CRACKED
0xe21b3 85 3B

md5:c3522c719d24f85dd770c93b9bf9e56f

@andyyou
andyyou / fix_homebrew.rb
Created Sep 24, 2015 — forked from rpavlik/fix_homebrew.rb
Fix permissions on /usr/local for Homebrew
View fix_homebrew.rb
#!/usr/bin/ruby
#
# This script fixes /usr/local only.
#
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several