Skip to content

Instantly share code, notes, and snippets.

View denisinla's full-sized avatar
👋

denisinla

👋
View GitHub Profile
@denisinla
denisinla / device-dpi.css
Created February 7, 2015 01:25
Media Query for targeting device ratio and DPI.
.box {
background: url( 'img/box-bg.png' ) no-repeat top left;
width: 200px;
height: 200px;
}
@media only screen and ( -webkit-min-device-pixel-ratio: 1.3 ),
only screen and ( min--moz-device-pixel-ratio: 1.3 ),
only screen and ( -o-min-device-pixel-ratio: 2.6/2 ), /* returns 1.3, see Dev.Opera */
only screen and ( min-device-pixel-ratio: 1.3 ),
only screen and ( min-resolution: 124.8dpi ),
@denisinla
denisinla / absolute-center.css
Created February 7, 2015 01:25
Absolute center!
div{
position: absolute;
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
}
@denisinla
denisinla / .vimrc
Created February 20, 2015 21:54
.vimrc - backup
"~/.vimrc
execute pathogen#infect()
filetype plugin indent on
set encoding=utf-8
set number
syntax on
set background=dark
@denisinla
denisinla / keybinds.json
Created April 7, 2015 19:50
ST3 - Keybindings
[
{ "keys": ["super+alt+7"], "command": "encode_html_entities" },
{ "keys": ["shift+ctrl+u"], "command": "title_case" },
{ "keys": ["super+enter"], "command": "insert", "args": {"characters": "<br>\n"} },
{ "keys": ["super+alt+l"], "command": "insert_snippet", "args": {"contents": "<li>${0:$SELECTION}</li>" } },
{ "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "<strong>${0:$SELECTION}</strong>" } },
{ "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "<em>${0:$SELECTION}</em>" } },
{ "keys": ["super+alt+n"], "command": "insert_snippet", "args": {"contents": "<span>${0:$SELECTION}</span>" } },
{ "keys": ["super+alt+down"], "command": "insert_snippet", "args": {"contents": "<sub>${0:$SELECTION}</sub>" } },
@denisinla
denisinla / osx_install.sh
Created October 3, 2015 01:21 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@denisinla
denisinla / README.md
Created December 1, 2015 19:33 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@denisinla
denisinla / dropbox-setup.markdown
Created December 16, 2012 23:11
Setup Dropbox on Fedora 17.

Configure Dropbox Repository
Create a file called dropbox.repo inside of /etc/yum.repos.d

$ cd /etc/yum.repos.d
$ sudo vim dropbox.repo

Paste the following:

``[Dropbox] name=Dropbox Repository

@denisinla
denisinla / git-lg.markdown
Created December 16, 2012 23:08
Disabling zsh's autocorrect for 'git lg' command.

You can add a line to your .zshrc to ignore auto-correct for all git commands:

alias git='nocorrect git'

The other option is to re-create your aliases from .gitconfig in .zshrc like so:

alias 'glg'='git lg'

@denisinla
denisinla / deployment.md
Last active December 15, 2015 22:29
Deploying a bare git repository on an Ubuntu EC2 instance.

Git deploy setup:

copy your public key to your ec2 instance:

cat ~/.ssh/id_rsa.pub | ssh -i ~/.ssh/your_pemfile.pem ubuntu@your_ip_addr "cat>> .ssh/authorized_keys"

on remote server: create bare git directory

@denisinla
denisinla / bluetooth-commandline.md
Last active December 17, 2015 23:19
Ever leave your bluetooth mouse in the conference room a few feet away but you're not allowed to get back in there due to important meetings ? Well follow the snippet below and get command-line access to your bluetooth settings. Enjoy.

Install blueutil via brew(package manager for OSX - http://mxcl.github.io/homebrew/)


$ brew install blueutil # install it

$ blueutil power 0 # turn bluetooth off