Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View roolo's full-sized avatar

Mailo Světel roolo

View GitHub Profile
@roolo
roolo / Xorg.0.log
Created January 12, 2011 22:07
Ubuntu 10.10, Asus M50VC, Nvidia GeForce 9300M G,External Monitor
[ 6508.559]
X.Org X Server 1.9.0
Release Date: 2010-08-20
[ 6508.559] X Protocol Version 11, Revision 0
[ 6508.559] Build Operating System: Linux 2.6.24-27-server i686 Ubuntu
[ 6508.559] Current Operating System: Linux kazimir 2.6.35-24-generic-pae #42-Ubuntu SMP Thu Dec 2 03:21:31 UTC 2010 i686
[ 6508.559] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.35-24-generic-pae root=UUID=e594406a-fea8-4fe5-9b4f-b61021389683 ro splash quiet vga=773 quiet splash
[ 6508.559] Build Date: 23 November 2010 09:54:06PM
[ 6508.559] xorg-server 2:1.9.0-0ubuntu7.1 (For technical support please see http://www.ubuntu.com/support)
[ 6508.559] Current version of pixman: 0.18.4
@roolo
roolo / xorg.conf-devices
Created January 14, 2011 00:30
Ubuntu - External monitor - Blogpost - attachments
Section "Device"
Identifier "Default Device"
Driver "nvidia"
Option "NoLogo" "True"
Screen 0
EndSection
Section "Device"
Identifier "External screen device"
Driver "nvidia"
@roolo
roolo / check-all-checkboxes.js
Created September 27, 2011 01:10
Checks all checkboxes on page
inputs = document.getElementsByTagName('input');for(i = 0; i < inputs.length; i++){ if(inputs[i].type == 'checkbox'){inputs[i].checked = true;}}
@roolo
roolo / git-changes-view_difference.sh
Created October 13, 2011 14:02
Two views for changes in git
git commit --dry-run;
git status;
@roolo
roolo / .gitconfig
Created October 21, 2011 14:39
git-merge with KDiff3 on Mac OS X Lion
# This is file ~/.gitconfig
[merge]
tool = extMerge
[mergetool "extMerge"]
cmd = ~/bin/extMerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\"
@roolo
roolo / test.php
Created November 7, 2011 15:13
Coalesce in query builder - symfony2
<?php
$queryBuilder->addSelect(
sprintf(
'COALESCE(%s.weight+%s.weight, %s.weight) AS weightBefore',
$object1->getEntityAlias(),
$object2->getEntityAlias(),
$object1->getEntityAlias()
)
);
@roolo
roolo / datetimes.xml
Created November 8, 2011 22:09
Mwstt-datetimes
<?xml version="1.0" encoding="UTF-8"?>
<datetimes type="array">
<datetime>
<activities-id type="integer" nil="true"/>
<activity-id type="integer">55</activity-id>
<created-at type="datetime">2011-10-20T00:06:13+02:00</created-at>
<description nil="true"/>
<id type="integer">183</id>
<in-ctt type="boolean" nil="true"/>
<start type="datetime">2011-10-20T00:06:13+02:00</start>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roolo
roolo / AppDelegate.h
Created January 12, 2012 10:40
Your First Mac App -- updateUserInterface reference issue
#import <Cocoa/Cocoa.h>
@class Track;
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@property (weak) IBOutlet NSTextField *textField;
@property (weak) IBOutlet NSSlider *slider;
@roolo
roolo / books_spec.rb
Created January 23, 2012 17:02
RSpec test
require 'spec_helper'
describe "Books" do
describe "PUT /books/:id" do
it "updates a book" do
book = {name: 'Alchandira', description: 'Something'}
updated_book = {name: 'Cave', description: 'Something'}
# Create book
post books_path, book: book