Skip to content

Instantly share code, notes, and snippets.

View ostretsov's full-sized avatar
🏠
Working from home

Artem Ostretsov ostretsov

🏠
Working from home
View GitHub Profile
@ostretsov
ostretsov / gist:1933614
Created February 28, 2012 16:51
Xorg.0.log
[ 2614.739]
X.Org X Server 1.10.4
Release Date: 2011-08-19
[ 2614.739] X Protocol Version 11, Revision 0
[ 2614.739] Build Operating System: Linux 2.6.24-29-server i686 Ubuntu
[ 2614.739] Current Operating System: Linux minibook 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:50:54 UTC 2012 i686
[ 2614.740] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.0.0-16-generic root=UUID=c33467e3-f6bd-4e4a-87f7-908adaa24262 ro quiet splash vt.handoff=7
[ 2614.740] Build Date: 19 October 2011 05:09:41AM
[ 2614.740] xorg-server 2:1.10.4-1ubuntu4.2 (For technical support please see http://www.ubuntu.com/support)
[ 2614.740] Current version of pixman: 0.22.2
@ostretsov
ostretsov / AngularedCollectionController.js
Last active August 29, 2015 14:05
AngularJS Collection controller for symfony2
sciApp.controller('AngularedCollectionController', ['$scope', '$compile', function ($scope, $compile) {
$scope.index = 1;
$scope.init = function (collectionId) {
var indexes = [];
$('#' + collectionId).find('input[type=hidden]').each(function () {
var attrName = $(this).attr('name');
var indexFinder = new RegExp('\\]\\[(\\d+)\\]\\[');
def max(x: Int, y: Int): Int = {
if (x > y)
x
else
y
}
if (x > y) x else y
var i = 0
while (i < args.length) {
println(args(i))
i += 1
}
args.foreach(arg => println(arg))
args.foreach(println)
for (arg <- args)
println(arg)
val a = Array("Test", "is", "ok")
println(a(0));
println(a.apply(0)); // same as previous
for (i <- 0 to 10) println(i)
for (i <- 0.to(10)) println(i) // same as previous