This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var node = $("#node"); | |
var nodeAgain = $("#node"); | |
var body = $("body"); | |
body.removeChild(node); | |
node = null; | |
nodeAgain = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from "ember"; | |
import DS from 'ember-data'; | |
export default DS.ActiveModelAdapter.extend({ | |
ajax: function(url, type, hash) { | |
var browser, adapter; | |
adapter = this; | |
return new Ember.RSVP.Promise(function(resolve, reject) { | |
var options = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Golang Websocket Server | |
server { | |
listen 8080; | |
server_name wss.morse.io; | |
access_log /var/log/nginx/access_log.log; | |
error_log /var/log/nginx/error.log; | |
#ssl config | |
ssl on; | |
#Cert Info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type MemberInitFunction func() (interface{}, error) | |
type ConnectionPool struct { | |
size int | |
conn chan interface{} | |
} | |
func (p *ConnectionPool) Init(size int, initFn MemberInitFunction) error { | |
p.conn = make(chan interface{}, size) | |
for i := 0; i < size; i++ { | |
conn, err := initFn() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When assigning string a = string b, Ruby simply makes string b a *ptr to string a | |
# The generic string a += string b will convert string b to a new object | |
# String concatenation (a.concat(b), a << b) will not, leading to unexpected values for a | |
#Initialize first and last name | |
1.9.3p125 :002 > first_name = "Alex" | |
=> "Alex" | |
1.9.3p125 :003 > last_name = " Blom" | |
=> " Blom" | |