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 / jquery.onezero-0.1.js
Created June 8, 2012 14:29
Make my site One Zero site
/**
* oneZero plugin for true coders
*
* How to use
*
* $('html').oneZero(); //replace all chars that is valid for default regex in html node
*
* $('#footer').oneZero({charsPattern:/^[0-9]$/i}); //replace all numerical chars in #footer node
*
*
public function getHtml($url, $follow = true, $level = 100) {
echo "\n\n=======GET====================\n";
echo $url . "\n";
echo "\n";
return parent::getHtml($url, $follow, $level);
}
public function postHtml($url, $post, $follow = true, $level = 5) {
echo "\n\n=======POST====================\n";
echo $url . "\n";
# phpmd/PHP_PMD
pear channel-discover pear.phpmd.org
pear channel-discover pear.pdepend.org
pear install --alldeps phpmd/PHP_PMD
@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
#!/bin/bash
#
# Ivan Scherbak <funivan.com>
if [ -z "$1" ]; then
echo "set argument";
exit;
elif [ $1 = "--backup" ]
then
#!/bin/bash
#
# Ivan Scherbak <funivan.com>
# Configure global commands
#
# unset global user
git config --global --unset user.name;
git config --global --unset user.email;
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`
@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
@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 / 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