Skip to content

Instantly share code, notes, and snippets.

View AleksandrMihhailov's full-sized avatar
:octocat:
The only way to do great work is to love what you do

Aleksandr Mihhailov AleksandrMihhailov

:octocat:
The only way to do great work is to love what you do
View GitHub Profile
for (var line=1; line<60; line++) {
for(var i=1;i<29;i++) {
var s = (Math.floor((Math.random()*2)%2)) ? "╱" : "╲";
document.write(s);
}
document.writeln("<br>");
}
@AleksandrMihhailov
AleksandrMihhailov / SaceGray.itermcolors
Created September 22, 2016 17:45
SpaceGray colorscheme for iTerm2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
@AleksandrMihhailov
AleksandrMihhailov / mc-colorscheme
Created September 2, 2016 17:50
Midnight Commander colorscheme
# ~/.config/mc/ini
[Colors]
base_color=lightgray,blue:normal=blue,default:reverse=green,default:gauge=gray,lightgray:selected=white,blue:marked=yellow,default:markselect=yellow,default:directory=brightblue,default:executable=brightgreen,default:link=cyan,default:device=brightmagenta,default:core=red,default:special=lightgray,default:dnormal=lightgray,blue:dfocus=lightgray,black:dhotnormal=yellow,blue:dhotfocus=yellow,black:menunormal=lightgray,blue:menuhot=yellow,blue:menusel=lightgray,black:menuhotsel=yellow,black:menuinactive=lightgray,gray:errors=lightgray,red:errdhotnormal=yellow,red:errdhotfocus=yellow,lightgray:input=lightblue,gray:inputunchanged=blue,gray:inputmark=white,blue:bbarhotkey=white,black:bbarbutton=lightgray,blue:viewbold=lightgray,default:viewunderline=lightblue,default:viewselected=lightgray,grey:helpnormal=lightgray,default:helpitalic=lightblue,default:helpbold=lightgray,default:helplink=green,default:helpslink=lighgreen,defalt:
@AleksandrMihhailov
AleksandrMihhailov / atom.sh
Created July 8, 2016 20:34
How to run atom from console
ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom
@AleksandrMihhailov
AleksandrMihhailov / .htaccess
Created July 1, 2016 15:42
protecting php project access
<Files ~ "^.*">
Deny from all
</Files>
<Files ~ "^index\.php|css|js|.*\.png|.*\.jpg|.*\.gif">
Allow from all
</Files>
@AleksandrMihhailov
AleksandrMihhailov / mac-hidden-files
Created June 17, 2016 18:24
Show hidden files in mac finder
defaults write com.apple.finder AppleShowAllFiles YES
@AleksandrMihhailov
AleksandrMihhailov / package.json
Last active May 12, 2016 15:27
Webpack config for ES6
{
"name": "webpack-es6",
"version": "1.0.0",
"description": "webpack es6 description",
"main": "bundle.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Aleksandr Mihhailov",
"license": "ISC",
mkdir ~/.go
echo "GOPATH=$HOME/.go" >> ~/.bashrc
echo "export GOPATH" >> ~/.bashrc
echo "PATH=\$PATH:\$GOPATH/bin # Add GOPATH/bin to PATH for scripting" >> ~/.bashrc
source ~/.bashrc
@AleksandrMihhailov
AleksandrMihhailov / daytime-color-scheme
Created April 6, 2016 14:16
Launch colorscheme based on time of day
" Launch colorscheme based on time of day
if strftime("%H") > 8 && strftime("%H") < 19
set t_Co=256
let g:solarized_termcolors=256
syntax enable
set background=light
colorscheme solarized
let g:airline_theme='badwolf'
else
colorscheme molokai
@AleksandrMihhailov
AleksandrMihhailov / angular-route.js
Created April 4, 2016 22:35
Will remove /#/ hash from url
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});