Skip to content

Instantly share code, notes, and snippets.

DIR=/tmp/$USER
mkdir $DIR
cd $DIR
export HOME=$DIR
https://github.com/mluukkai/ratebeer-public.git
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc

TMC pluginin asennus olemassa olevaan NetBeanssiin. Tee näin pajassa

Avaa NetBeans. Varmista, että versio, jota käytät on vähintään 8.0 (7.4 ja aiemmat voivat myös toimia)

Mene Tools -> Plugins

NB Plugin -> Settings

Valitse välilehti Settings ja valitse Add. Aseta nimeksi TMC Url to http://update.testmycode.net/tmc-netbeans_hy/updates.xml

@jamo
jamo / xvfb
Last active August 29, 2015 14:10 — forked from jterrace/xvfb
XVFB=/usr/bin/Xvfb
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset"
PIDFILE=/var/run/xvfb.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)
@jamo
jamo / new
Last active August 29, 2015 14:10
TMC speck run benchmark
git log last: 9f835f985c2422af7c0180562c401cebe45b6d11
/usr/bin/time -f "Hours: %E CPUsecK: %S CPUsecU %U MaxSize %M AvgUnshared: %D AvgShared: %X SysPageSize : %Z NumMajorFaults: %F NumMinorFaults: %R NumSwappedMainMem: %W NumForcedContextSwitch: %c NumWaits: %w NumFilesystemInputs: %I NumFilesystemOutputs: %O NumSocketReceived: %r NumSocketSent: %s NumSignalsTo: %k Command: %C ExitStatus: %x" env DISPLAY=:99 rvmsudo rake spec
Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run:
export rvmsudo_secure_path=1
to avoid the warning, put it in shell initialization file to make it persistent.
In case there is no `secure_path` in `/etc/sudoers`. Run:
root@(none):/# javac Paras.java
An exception has occurred in the compiler (1.8.0_45). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following dc in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.file.ZipFileIndexArchive$ZipFileIndexFileObject.<init>(ZipFileIndexArchive.java:121)
at com.sun.tools.javac.file.ZipFileIndexArchive.getFileObject(ZipFileIndexArchive.java:76)
at com.sun.tools.javac.file.JavacFileManager.listArchive(JavacFileManager.java:308)
at com.sun.tools.javac.file.JavacFileManager.listContainer(JavacFileManager.java:355)
at com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:624)
at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2748)
at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:2444)
@jamo
jamo / gist:1871098
Created February 20, 2012 20:08
NB loki
-------------------------------------------------------------------------------
>Log Session: Monday, February 20, 2012 8:59:42 PM CET
>System Info:
Product Version = NetBeans IDE 7.1 (Build 201112071828) (#e649e0c4c10c)
Operating System = Linux version 3.0.0-14-generic-pae running on i386
Java; VM; Vendor = 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02; Sun Microsystems Inc.
Runtime = Java(TM) SE Runtime Environment 1.6.0_26-b03
Java Home = /usr/lib/jvm/java-6-sun-1.6.0.26/jre
System Locale; Encoding = en_US (nb); UTF-8
Home Directory = /home/jarmo
2012-03-05T10:09:40+00:00 heroku[router]: GET furious-sunset-8607.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=8ms status=304 bytes=0
2012-03-05T10:09:40+00:00 heroku[router]: GET furious-sunset-8607.herokuapp.com/assets/rails.png dyno=web.1 queue=0 wait=0ms service=7ms status=304 bytes=0
2012-03-05T10:09:40+00:00 app[web.1]: cache: [GET /assets/rails.png] stale, valid, store
2012-03-05T10:09:48+00:00 app[web.1]:
2012-03-05T10:09:48+00:00 app[web.1]: Started GET "/posts" for 88.195.97.181 at 2012-03-05 10:09:48 +0000
2012-03-05T10:09:48+00:00 app[web.1]:
2012-03-05T10:09:48+00:00 app[web.1]: Processing by PostsController#index as HTML
2012-03-05T10:09:48+00:00 app[web.1]: Completed 500 Internal Server Error in 2ms
2012-03-05T10:09:48+00:00 app[web.1]:
2012-03-05T10:09:48+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
@jamo
jamo / messages.log
Created March 13, 2012 14:30
NB loki
-------------------------------------------------------------------------------
>Log Session: Tuesday, March 13, 2012 1:31:44 PM EET
>System Info:
Product Version = NetBeans IDE 7.1 (Build 201112071828) (#e649e0c4c10c)
Operating System = Linux version 3.0.0-14-generic-pae running on i386
Java; VM; Vendor = 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02; Sun Microsystems Inc.
Runtime = Java(TM) SE Runtime Environment 1.6.0_26-b03
Java Home = /usr/lib/jvm/java-6-sun-1.6.0.26/jre
System Locale; Encoding = en_US (nb); UTF-8
Home Directory = /home/jarmo
@jamo
jamo / tyylit.css
Created April 23, 2012 22:41
tyylit.css
body {
/* IE10 */
background-image: -ms-linear-gradient(top left, #FFFFFF 0%, #00A3EF 100%);
/* Mozilla Firefox */
background-image: -moz-linear-gradient(top left, #FFFFFF 0%, #00A3EF 100%);
/* Opera */
background-image: -o-linear-gradient(top left, #FFFFFF 0%, #00A3EF 100%);
@jamo
jamo / heroku_logs
Created May 28, 2012 05:48
rails_admin herokussa
2012-05-28T00:21:40+00:00 app[web.1]: cache: [GET /railsadmin/users] miss
2012-05-28T00:21:40+00:00 app[web.1]: Processing by RailsAdmin::MainController#index as HTML
2012-05-28T00:21:40+00:00 app[web.1]: Parameters: {"model_name"=>"users"}
2012-05-28T00:21:40+00:00 app[web.1]: Completed 500 Internal Server Error in 2281ms
2012-05-28T00:21:40+00:00 app[web.1]: Rendered vendor/bundle/ruby/1.9.1/gems/rails_admin-0.0.3/app/views/rails_admin/main/dashboard.html.haml within layouts/rails_admin/application (174.6ms)
2012-05-28T00:21:40+00:00 heroku[router]: GET blooming-river-6064.herokuapp.com/railsadmin/users dyno=web.1 queue=0 wait=0ms service=3215ms status=500 bytes=643
2012-05-28T00:21:41+00:00 app[web.1]: cache: [GET /favicon.ico] miss
2012-05-28T00:21:41+00:00 heroku[router]: GET blooming-river-6064.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=6ms status=200 bytes=0
2012-05-28T01:30:04+00:00 heroku[web.1]: Idling
2012-05-28T01:30:06+00:00 heroku[web.1]: Stopping all processes with SIGTER