Skip to content

Instantly share code, notes, and snippets.

@cqpx
cqpx / google-protobuf.linux.md
Last active February 5, 2021 14:59 — forked from diegopacheco/google-protobuf.linux.md
How to Install Google Protocol Buffers on Ubuntu Linux 15.10?
sudo apt-get install -y git autoconf automake libtool curl make g++ unzip
git clone https://github.com/google/protobuf.git
cd protobuf/
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.
{
"auto_indent": true,
"auto_match_enabled": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"draw_indent_guides": true,
// "ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
@cqpx
cqpx / hack.sh
Created March 17, 2014 22:51 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
CKEDITOR.editorConfig = ( config ) ->
config.toolbar_Forum = [
{
name: 'riga1'
items : [
"Source"
"Save"
"NewPage"
"DocProps"
"Preview"
[alias]
st = status -sb
ci = commit
br = branch -rv
co = checkout
df = diff
damn = blame
lg = log -p
who = shortlog -s --
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
@cqpx
cqpx / ms.js
Created December 21, 2011 04:00 — forked from rauchg/ms.md
Milliseconds conversion utility.
/**
# ms.js
No more painful `setTimeout(fn, 60 * 4 * 3 * 2 * 1 * Infinity * NaN * '☃')`.
ms('2d') // 172800000
ms('1.5h') // 5400000
ms('1h') // 3600000
ms('1m') // 60000
@cqpx
cqpx / index.js.erb
Created December 17, 2011 03:08 — forked from ryanb/index.js.erb
Infinite scrolling solution covered in revised episode #114: http://railscasts.com/episodes/114-endless-page-revised
$('#products').append('<%= j render(@products) %>');
<% if @products.next_page %>
$('.pagination').replaceWith('<%= j will_paginate(@products) %>');
<% else %>
$('.pagination').remove();
<% end %>
@cqpx
cqpx / .Xdefaults
Created December 6, 2011 03:33
urxvt xterm zenburn theme
URxvt*termName: rxvt-256color
URxvt*xftAntialias: true
URxvt*background: #3f3f3f
URxvt*foreground: #dcdccc
URxvt*cursorColor: #aaaaaa
URxvt*colorUL: #366060
URxvt*underlineColor: #dfaf8f
URxvt*color0: #3f3f3f
URxvt*color1: #cc9393
URxvt*color2: #7f9f7f
@cqpx
cqpx / strftime.md
Created November 17, 2011 00:31
time format for Ruby’s strftime