Skip to content

Instantly share code, notes, and snippets.

@while0pass
while0pass / gist:3072929
Created July 8, 2012 21:34
list al the logins for svn repo committers
svn log --quiet | grep "^r[0-9]" | awk '{print $3}' | sort | uniq
svn log --quiet | awk '/^r[0-9]/ {print $3}' | sort | uniq
svn log --quiet | awk '/^r[0-9]/ {print $3}' | sort -u
@media print {
/* Append the address of the link */
a[href]:after {
content: " (" attr(href) ")";
/* break long urls that don't fit the page width [http://www.w3.org/TR/css3-text/] */
word-break: break-all;
overflow-wrap: break-word;
}
a[href^="javascript:"]:after,
a[href^="#"]:after { content: "" }
@while0pass
while0pass / gist:3120262
Created July 16, 2012 03:27
Converting images to pdfs and combining multiple pdfs into a single one in Linux
# converting image to pdf
sudo apt-get install imagemagick
convert cover.png cover.pdf
# combining multiple pdfs into a single one
sudo apt-get install gs pdftk
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH cover.pdf ch1.pdf ch2.pdf ch3.pdf ix.pdf
@while0pass
while0pass / piratebay_index.py
Created December 6, 2012 06:30 — forked from maxpert/piratebay_index.py
Quick and dirty Whoosh Redis storage
"""
Copyright (c) 2012 Zohaib Sibte Hassan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
# Punctuation
# знаки препинания, необходимые в русском, которых нет в en_US.UTF-8/Compose
<Multi_key> <period> <minus> : "…" U2026 # HORIZONTAL ELLIPSIS, многоточие
<Multi_key> <period> <space> : "…" U2026 # HORIZONTAL ELLIPSIS, многоточие
<Multi_key> <?> <!> : "⁈" U2048 # QUESTION EXCLAMATION, ?!
<Multi_key> <period> <colon> : "…" # ELLIPSIS
# №: набирается в русской раскладке без ухищрений,
@while0pass
while0pass / dabblet.css
Created April 15, 2013 08:14 — forked from LeaVerou/dabblet.css
Scrolling shadows by @kizmarh and @LeaVerou
/**
* Scrolling shadows by @kizmarh and @leaverou
* Only works in browsers supporting background-attachment: local; & CSS gradients
* Degrades gracefully
*/
html {
background: white;
font: 120% sans-serif;
}
@while0pass
while0pass / inConsoleFindCircularRefs.js
Last active December 26, 2015 08:19
Find circular references in an object to be json-strinified.
ZZZ = document.createElement('script');
ZZZ.src = '//yandex.st/dojo/1.9.1/dojo/dojo.js';
document.body.appendChild(ZZZ);
// In firebug one can use ``include`` command instead:
// include('//yandex.st/dojo/1.9.1/dojo/dojo.js');
require(["dojox/json/ref"], function(){
window.ZZZ = dojox.json.ref.toJson(ko.toJS(objectWithCircularReferences));
});
@while0pass
while0pass / _readme.md
Last active August 29, 2015 14:06 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

Save yourself some time and run this little fellow!

Prerequisities

  • gcc
  • wget
$ ffmpeg -y -filter_complex 'amovie=/home/nurono/Desktop/kmvso.mp3, atrim=start=0:end=10, afade=t=in:st=0:d=2' n1.mp3
ffmpeg version N-40693-gf7bbe0f- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 9 2014 02:20:35 with gcc 4.8 (Debian 4.8.3-10)
configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --disable-ffserver --enable-libass --enable-gnutls --cc=gcc-4.8
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1
"""
Add copy to clipboard from IPython!
To install, just copy it to your profile/startup directory, typically:
~/.ipython/profile_default/startup/
Example usage:
%clip hello world
# will store "hello world"