Skip to content

Instantly share code, notes, and snippets.

View Cifro's full-sized avatar

Cifro Nix Cifro

View GitHub Profile
@Cifro
Cifro / gmail-scrollbars.css
Created December 29, 2011 17:23
New Gmail scrollbars for webkit browsers
/*
http://www.webkit.org/blog/363/styling-scrollbars/
*/
.zF.e-Rb::-webkit-scrollbar {
width: 12px
}
.zF.e-Rb::-webkit-scrollbar-thumb {
@Cifro
Cifro / gist:1699265
Last active September 30, 2015 01:18
Nice feature of Lisp is also in JavaScript
; Lisp
(defun generate-counter ()
(let ((memory 0))
(lambda () (incf memory))))
CG-USER(1): (setq fn (generate-counter))
CG-USER(2): (funcall fn)
1
CG-USER(3): (funcall fn)
2
;;; === Funkcia na generovaie n-tic ====
(defun gen2 (L &optional i)
(if (null L)
(list (reverse i))
(mapcan
(lambda (x) (gen2 (rest L) (cons x i)))
(first L))))
@Cifro
Cifro / create-thumbnails.sh
Created February 12, 2012 14:31
Shell scripts for creating thumbnails from video files
# Author: Cifro Nix, http://about.me/Cifro
#
# usage:
# ./create-thumbnails.sh
# will produce thumbnails with name "<id>.jpg" with size 220x122
#
# different size:
# ./create-thumbnails.sh 640x360 -big
# will produce thumbnails with name "<id>-big.jpg" with size 640x360
@Cifro
Cifro / NaoPosesInitialisation.cs
Created April 25, 2012 12:35
Problem with service ports...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRTM.Core;
using Aldebaran.Proxies;
namespace NaoMotionRTC
{
@Cifro
Cifro / Default (Windows).sublime-keymap
Created June 7, 2012 00:16
My Sublime Text 2 User Settings
[
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+shift+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+shift+k"], "command": "find_under_expand" },
{ "keys": ["alt+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}, "checkbox": true }
]
@Cifro
Cifro / index.php
Created November 6, 2012 10:32
WpLatte 2.0
{* more sexy and Pro *}
{if $wp->havePosts}
{* more familiar for wp devs & users, but unsexy *}
{if have_posts()}
@Cifro
Cifro / stick-to-top.html
Created January 22, 2013 17:14
Stick to top simple example
<!doctype html>
<head>
<title>Stick to top simpe exmaple</title>
<style>
body{margin:0; padding: 0; font-family: Segoe UI, sans-serif; }
#header{
background: #ccc;
border: 1px solid #ccc;
@Cifro
Cifro / funception-alternative-ending.php
Last active December 11, 2015 22:09
Funception in PHP - We need go deeper
<?php
/**
* Alterantive Funception in PHP
* All functions are in the global scope
*/
function We(){
echo "We ";
function need(){
echo "need ";
@Cifro
Cifro / funception2.php
Last active December 11, 2015 22:18
Funception in PHP II. - We need go deeper
<?php
/**
* Funception in PHP II.
*/
function We(){
class need{
function need(){
$o = (object) null;