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
{ | |
"scripts": { | |
"test": "mocha test.js" | |
}, | |
"dependencies": { | |
"mocha": "^3.2.0", | |
"react": "^15.4.1", | |
"react-addons-test-utils": "^15.4.1", | |
"react-dom": "^15.4.1", | |
"react-test-renderer": "^15.4.1", |
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 {updateItemReducer} from './todo/reducerToDo'; | |
import {manageUser} from './user/userReducer'; | |
import {createStore, combineReducers } from 'redux'; | |
import * as Actions from './user/userActions' | |
const reducers = combineReducers ({ | |
updateItemReducer, | |
manageUser | |
}) |
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
function benchmark (callback) { | |
var start = new Date().getMilliseconds(); | |
callback(function () { | |
var end = new Date().getMilliseconds(); | |
console.log("This operation took " + (end - start) + " milliseconds."); | |
}); | |
} | |
benchmark(function (done) { | |
var oldInnerHTML = document.body.innerHTML; |
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
a = [1, 2, 3, 4, 5] | |
a.collect { |n| next if n % 2 == 1; n * 2 }.compact # => [4, 8] | |
a.select { |n| n % 2 == 0 }.map { |n| n * 2 } # => [4, 8] |
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
if defined?(Rails) | |
IRB.conf[:IRB_RC] = Proc.new do | |
$: << 'path-to-your-hirb-installation' | |
require 'hirb' | |
Hirb.enable | |
end | |
end |
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
# Additional translations at https://github.com/scambra/devise_invitable/wiki/I18n | |
'no': | |
devise: | |
invitations: | |
send_instructions: 'En epost med invitasjon er sent til %{email}.' | |
invitation_token_invalid: 'Autentiseringskoden er ikke gyldig!' | |
updated: 'Passordet ble oppdatert suksessfullt. Du er nå logget inn.' | |
no_invitations_remaining: 'Ingen gjenværende invitasjoner.' | |
invitation_removed: 'Din invitasjon ble fjernet.' |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' | |
} | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;35m\]$(parse_git_branch)\[\033[00m\]\$ ' |
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
for i in range(args.n_timesteps): | |
spike_train.append(v) | |
if v > 0.035: | |
v = c | |
u = u + d | |
spikes.append(i) | |
d_v = (1 / 10.0) * (k * v**2 + 5 * v + 140 - u + 1) |
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
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
'no': | |
devise: | |
confirmations: | |
confirmed: "Din konto er aktivert og du er nå innlogget." | |
send_instructions: "Du vil innen få minutter motta en epost med instruksjoner for å aktivere din konto." | |
send_paranoid_instructions: "Hvis epostadressen din finnes i vår database vil du innen få minutter motta en epost med instruksjoner for å aktivere din konto." | |
failure: | |
already_authenticated: "Du er allerede logget inn." |
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
ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML) |
NewerOlder