Skip to content

Instantly share code, notes, and snippets.

View dz0ny's full-sized avatar
💭
❤️✖️❓🤖

Janez Troha dz0ny

💭
❤️✖️❓🤖
View GitHub Profile
Processing ProjectsController#show (for 84.41.89.22 at 2010-09-13 19:33:19) [GET]
Parameters: {"action"=>"show", "id"=>"mladinski-mediji-doo", "controller"=>"projects"}
Rendering template within layouts/application
Rendering projects/show
ActionView::TemplateError (undefined method `edit_project_project_comment_path' for #<ActionView::Base:0x8658940>) on line #23 of app/views/comments/_comment.haml:
20: = link_to t('comments.actions.conversation_url'), project_conversation_path(comment.project, comment.target)
21: = link_to t('comments.actions.edit'), [:edit, comment.project, comment.target, comment],
22: :rel => 'facebox', :'data-uneditable-message' => t('.cannot_edit'), :class => :edit
23: - unless comment.target.is_a?(Project) or comment.target.is_a?(TaskList) # legacy comments targeting a Project or a TaskList
echo '
# Tomato Backup Script 2010/10/24 - v6.0 - FULL VERSION
# Written By: Austin Saint Aubin
#Use "nvram set usb_disk_main=/tmp/mnt/USB_DISK" to set a global main usb disk for all scripts.
FlashDrvDIR=$(nvram get usb_disk_main)
ComDIR="Tomato"
NumOfBackupsToKeep=28
backupToUSB()
@dz0ny
dz0ny / gist:655830
Created October 30, 2010 22:46
Example of FormaData for Chrome and Firefox
$.each(dataTransfer.files, function ( i, file ) {
var xhr = new XMLHttpRequest();
var upload = xhr.upload;
var formdata = new FormData();
//formdata.append("session",socket.transport.sessionid);
formdata.append('mycustomfieldforfile', file);
xhr.open("POST", "/post/file");
xhr.send(formdata);
@dz0ny
dz0ny / vit.sh
Created October 31, 2010 15:17
vit -- Vital Statistics Monitoring Command
cat <<END >/var/wwwext/vit.cgi
# vit: Vital Stats # Planiwa 2009-11-27
INTERFACES="ppp0 eth1"; HALF=500; DIVI=1000; COUNTWHAT="bytes" # Defaults
while [ $# -gt 0 ]
do
case "$1" in
-*elp|-\?|-h) echo "Syntax vit [-h] [-t] [-k] [-p] [-d] [-dir] [-all] [Interface ...]
-h This help
-t Show title headers
totem --debug
(totem:2946): Totem-DEBUG: Received SaveYourself(SmSaveLocal, !Shutdown, SmInteractStyleNone, !Fast) in state idle
(totem:2946): Totem-DEBUG: Setting initial properties
(totem:2946): Totem-DEBUG: Sending SaveYourselfDone(True) for initial SaveYourself
(totem:2946): Totem-DEBUG: Received SaveComplete message in state save-yourself-done
(totem:2946): Totem-DEBUG: totem_playlist_add_one_mrl (): 13. Andrew Bird - The Giant Of Illinois (null) (null)
** Message: Error: Failed to create stream: Ni podprto
pulsesink.c(923): gst_pulseringbuffer_acquire (): /GstPlayBin2:play/GstPlaySink:playsink0/GstBin:abin/GstBin:audiosinkbin/GstGConfAudioSink:audio-sink/GstBin:bin2/GstAutoAudioSink:autoaudiosink1/GstPulseSink:autoaudiosink1-actual-sink-pulse
** Running Mono with --debug **
[1 Info 12:03:29.822] Running Banshee 1.8.0: [Ubuntu 10.10 964f671 (linux-gnu, x86_64) @ 2010-10-29 16:19:52 UTC]
[1 Debug 12:03:29.845] Initializing GTK
ERROR: There was an error while scanning assembly: /usr/lib/banshee-1/Extensions/Banshee.Hypem.dll (The add-in configuration file is invalid: a name did not start with a legal character 32 ( ) Line 9, position 23.)
[1 Debug 12:03:31.144] Post-Initializing GTK
[1 Debug 12:03:31.162] Configuration client extension loaded (Banshee.GnomeBackend.GConfConfigurationClient)
[1 Debug 12:03:31.172] Using default gconf-base-key
[1 Debug 12:03:31.199] Bus.Session.RequestName ('org.bansheeproject.Banshee') replied with PrimaryOwner
[1 Debug 12:03:31.269] Core service started (DBusServiceManager, 0,001244)
[1 Debug 12:03:31.271] Registering remote object /org/bansheeproject/Banshee/DBusCommandService (Banshee.ServiceStack.DBusCommandService) on org.bansheeproject.Banshee
@dz0ny
dz0ny / gist:706868
Created November 19, 2010 17:58
Demo način štetja oseb
char ukaz;
volatile unsigned long zadnja_komunikacija = 0;
volatile unsigned long zadnji_cas = 0;
char vse = 'a';
char resetiraj = 'c';
char baterija = 'b';
int trenutno = 0;
int prvi;
int drugi;
int dovoli = 1;
#include <EEPROM.h>
int luc = 13;
volatile int stanjeLuci = LOW;
void setup()
{
pinMode(luc, OUTPUT);
stanjeLuci = EEPROM.read(88); // pač naslov možno je od 0 do 255
digitalWrite(luc, stanjeLuci);
function rpcTransmission(args, method, tag, port) {
var xhr = new XMLHttpRequest();
xhr.open('POST', localStorage.server + '/rpc', true, localStorage.user, localStorage.pass);
xhr.setRequestHeader('X-Transmission-Session-Id', localStorage.sessionId);
if (method === 'torrent-add' && typeof(new XMLHttpRequest().responseType) != "undefined") {
var torrent = new XMLHttpRequest();
torrent.open('GET', JSON.parse("{" + args + "}").filename, true);
torrent.overrideMimeType('text/plain; charset=x-user-defined');
torrent.responseType = "arraybuffer";
torrent.onload = function(ev) {
--disable-ipv6 \
--disable-inotify \
--disable-flac \
--disable-oggflac \
--disable-vorbis \
--disable-vorbis-encoder \