Skip to content

Instantly share code, notes, and snippets.

@ee7klt
ee7klt / parprog0
Created January 17, 2017 04:27
parallelism on the jvm ii
class Account(private var amount: Int = 0) {
def transfer(target:Account, n: Int) =
this.synchronized {
target.synchronized {
this.amount -= n
target.amount += n
}
}
}
whats the point of 'se' in this sentence? why not just: 'Él va al restaurante.'
Bisade, "se" is used because the verb is reflexive. Duolingo is technically incorrect. It should be He leaves for the restaurant--with the implied meaning that he is in one place headed for another place. IR (to go) changes meaning when used as a reflexive verb. IRSE = to leave. Think of these two English sentences: I am going to the restaurant tomorrow. I am leaving for the restaurant from my office. The first would use IR; the latter would use IRSE.
# Easily extract all compressed file types
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
@ee7klt
ee7klt / nexus10-emu-error
Created January 13, 2014 04:46
cannot run nexus 10 emulator in eclipse
01-13 04:33:46.801: W/Resources(1698): Preloaded drawable resource #0x10805ff (android:drawable/textfield_searchview_holo_light) that varies with configuration!!
01-13 04:33:46.801: W/Resources(1698): Preloaded drawable resource #0x10805fa (android:drawable/textfield_search_right_selected_holo_light) that varies with configuration!!
01-13 04:33:46.801: W/Resources(1698): Preloaded drawable resource #0x10805f8 (android:drawable/textfield_search_right_default_holo_light) that varies with configuration!!
01-13 04:33:46.801: W/Resources(1698): Preloaded drawable resource #0x1080601 (android:drawable/textfield_searchview_right_holo_light) that varies with configuration!!
01-13 04:33:46.801: W/Resources(1698): Preloaded drawable resource #0x10805fc (android:drawable/textfield_search_selected_holo_dark) that varies with configuration!!
01-13 04:33:46.801: W/Resources(1698): Preloaded drawable resource #0x10805f0 (android:drawable/textfield_search_default_holo_dark) that varies with configuration!!
01-13 04:33:46.801
@ee7klt
ee7klt / foreman.pause.error
Created August 20, 2013 16:58
foreman error: cannot find module pause
[ubuntu@ip-10-164-107-15:~/bitstarter-ssjs-db]$
[ubuntu@ip-10-164-107-15:~/bitstarter-ssjs-db]$foreman start
16:54:54 web.1 | started with pid 1338
16:54:54 web.1 | node.js:201
16:54:54 web.1 | throw e; // process.nextTick error, or 'error' event on first tick
16:54:54 web.1 | ^
16:54:54 web.1 | Error: Cannot find module 'pause'
16:54:54 web.1 | at Function._resolveFilename (module.js:332:11)
16:54:54 web.1 | at Function._load (module.js:279:25)
16:54:54 web.1 | at Module.require (module.js:354:17)
@ee7klt
ee7klt / stripe.package.json
Created August 18, 2013 07:36
meteor/modulus: package.json for tachyoned withs stripe dependency
{
"name": "TachyonEd",
"description": "TachyonEd - automatically converted by Demeteorizer. https://github.com/onmodulus/demeteorizer",
"version": "0.0.1",
"main": "main.js",
"engines": {
"node": "0.8.24"
},
"dependencies": {
"clean-css": "0.8.3",
@ee7klt
ee7klt / stripe.not.found
Created August 18, 2013 06:52
modulus/meteor: stripe module not found
[2013-08-18T05:11:05.563Z] Application CRASH detected.
[2013-08-18T05:11:06.445Z] Application restarted with pid undefined
Error: Cannot find module '/mnt/data/1/public/node_modules/stripe'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object._.each.Npm.require (/mnt/data/1/server/server.js:253:20)
at app/server/server.coffee.js:17:14
at /mnt/data/1/server/server.js:298:12
@ee7klt
ee7klt / modulus.chat
Created August 18, 2013 01:13
chat with @InconceivableB
[All systems operational]
[09:03] == alex___ [af88a457@gateway/web/freenode/ip.175.136.164.87] has joined #Modulus
[09:04] == mokes [[email protected]] has joined #Modulus
[09:04] <alex___> does modulus work with meteor 0.6.5 yet?
[09:04] == mokes [[email protected]] has quit [Read error: Connection reset by peer]
[09:05] <@InconceivableB> we did a release yesterday for 0.6.5, but it appears a few dependencies are still being missed
[09:05] <@InconceivableB> a release of demeteorizer
[09:06] == mokes [[email protected]] has joined #Modulus
[09:06] == mokes [[email protected]] has quit [Read error: Connection reset by peer]
[09:06] <alex___> getting an error saying npm module connect can't be found
@ee7klt
ee7klt / npm.depends
Created August 18, 2013 00:49
meteor modulus deploy error: Npm.depends
Welcome to Modulus
You are logged in as [email protected]
[?] Are you sure you want to use project leaderboard? (yes)
at Array.forEach (native)
at Function._.each._.forEach (/mnt/data/2/node_modules/underscore/underscore.js:79:11)
at /mnt/data/2/programs/server/boot.js:80:5
[2013-08-18T00:44:49.024Z] Application CRASH detected.
[2013-08-18T00:44:50.616Z] Application restarted with pid undefined
/mnt/data/2/programs/server/boot.js:184
@ee7klt
ee7klt / heroku.logs
Created August 17, 2013 18:08
push meteor app to heroku fail
2013-08-17T18:01:37.530687+00:00 heroku[api]: Enable Logplex by [email protected]
2013-08-17T18:01:37.555537+00:00 heroku[api]: Release v2 created by [email protected]
2013-08-17T18:01:38.217833+00:00 heroku[api]: Add BUILDPACK_URL config by [email protected]
2013-08-17T18:01:38.243813+00:00 heroku[api]: Release v3 created by [email protected]
2013-08-17T18:01:51.931211+00:00 heroku[api]: Add MONGO_URL config by [email protected]
2013-08-17T18:01:51.952696+00:00 heroku[api]: Release v4 created by [email protected]
2013-08-17T18:02:05.443420+00:00 heroku[api]: Add ROOT_URL config by [email protected]
2013-08-17T18:02:05.462833+00:00 heroku[api]: Release v5 created by [email protected]
2013-08-17T18:04:36+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-17T18:05:40+00:00 heroku[slug-compiler]: Slug compilation finished