Skip to content

Instantly share code, notes, and snippets.

View funivan's full-sized avatar
⌨️
deliver bits

Ivan Shcherbak funivan

⌨️
deliver bits
View GitHub Profile
@funivan
funivan / save.js
Created June 18, 2013 08:55
Pocket new feature
// Just add this text to bookmark panel
javascript:(function () {ISRIL_SCRIPT = document.createElement('SCRIPT');ISRIL_SCRIPT.type = 'text/javascript';ISRIL_SCRIPT.src='http://localhost/Fiv/tools/saveForFun/save.js';document.getElementsByTagName('head')[0].appendChild(ISRIL_SCRIPT)})();
// Next content save to http://localhost/Fiv/tools/saveForFun/save.js
//
@funivan
funivan / gist:5575668
Last active December 17, 2015 07:49
jquery.ukrtranslit.js
(function($){
/**
* 1.0
* Author Ivan Scherbak dev@funivan.com
* $('#title').ukrtranslit('#sef');
*
*/
$.fn.extend({
ukrtranslit : function(el) {
var translitTable = new Array();
@funivan
funivan / gist:5517770
Last active December 16, 2015 23:59
ubuntu fix
sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop
#remove unitry
sudo apt-get remove unity unity-2d unity-2d-panel unity-2d-spread unity-asset-pool unity-services unity-lens-files unity-lens-music unity-lens-applications gir1.2-unity-5.0 unity-common libindicator7 indicator-application indicator-datetime indicator-messages libnux-2.0-0 nux-tools libunity-misc4 unity-2d-common
sudo apt-get install gnome-session-fallback
@funivan
funivan / git_two_repos.sh
Created April 19, 2013 08:35
git two repos.sh
git remote add github <url>
git push github
@funivan
funivan / optimize-ubuntu-on-ssd.sh
Last active December 16, 2015 09:29
optimize ubuntu on ssd
sudo fstrim / -v
gksudo gedit /etc/fstab
# demo :
# UUID=aeade6fd-2b24-4e59-bc8c-6f1791338b0c / ext4 noatime,nodiratime,discard,errors=remount-ro,commit=60 0 1
# add this
# add this
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
#!/bin/bash
#
# Ivan Scherbak <funivan.com>
# Configure global commands
#
# unset global user
git config --global --unset user.name;
git config --global --unset user.email;
#!/bin/bash
#
# Ivan Scherbak <funivan.com>
if [ -z "$1" ]; then
echo "set argument";
exit;
elif [ $1 = "--backup" ]
then
@funivan
funivan / ubuntu-configuration-options.sh
Last active December 10, 2015 13:58
Ubuntu config
#!/bin/bash
#
# Ivan Scherbak <dev@funivan.com> 2013
#
# Install programs and tweak ubuntu :)
#
source ~/funivan/lib.sh
# phpmd/PHP_PMD
pear channel-discover pear.phpmd.org
pear channel-discover pear.pdepend.org
pear install --alldeps phpmd/PHP_PMD