Skip to content

Instantly share code, notes, and snippets.

View Cifro's full-sized avatar

Cifro Nix Cifro

View GitHub Profile
@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 / 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 / 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 / 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 / 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
;;; === 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 / 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
@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 / pkg_install_python_ubuntu_11_10_hack.sh
Created October 26, 2011 22:25
Installation script of OpenRTM-aist 1.1.0-RC1 Python version on Ubuntu 11.10
#!/bin/sh
#
# @file pkg_install_ubuntu.sh
# @brief OpenRTM-aist dependent packages install script for Debian-sarge
# @author Noriaki Ando <[email protected]>
# Shinji Kurihara
# Tetsuo Ando
# Harumi Miyamoto
#
# Cifro Nix // Modified for Ubuntu 11.10, there is no package for 11.10 yet
@Cifro
Cifro / NaoPositions.py
Created October 20, 2011 19:27
NaoPositions.py - Python module with Nao's basic positions
## @package NaoPositions
# @author Cifro Nix (http://about.me/Cifro)
# @version 1.0
#
# Contains functions for basic Nao's positions
#
# Requires naoqi-sdk-1.10.52 or newer
#
# Up to date source code is available at:
# https://gist.github.com/1302060