Skip to content

Instantly share code, notes, and snippets.

View hiroppy's full-sized avatar
:electron:
focusing on my works

Yuta Hiroto hiroppy

:electron:
focusing on my works
View GitHub Profile
@miguelludert
miguelludert / Cross platform js modules
Created August 29, 2012 13:34
Snippet for cross platform javascript modules
(function(){
"use strict";
var result = {}; // your javascript module
if(typeof define !== undefined && typeof define.amd !== undefined ){
define(function(){
return result;
});
} else if(typeof module !== undefined && typeof module.exports !== undefined ){
module.exports = result;
} else {
@plentz
plentz / nginx.conf
Last active July 17, 2024 09:16
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@voluntas
voluntas / webrtc.rst
Last active June 27, 2024 02:25
WebRTC コトハジメ
@mjackson
mjackson / app.js
Created December 29, 2015 05:07
Using webpack with pixi.js
var PIXI = require('pixi.js')
console.log(PIXI)

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).