Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@k1ife
k1ife / ie67891011-css-hacks.txt
Created April 20, 2017 17:03 — forked from ricardozea/ie67891011-css-hacks.txt
IE CSS hacks - IE6, 7, 8, 9, 10, 11
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================
Usage example:
>> text = Morpher.new('Большой город')
{:Р=>"Большого города", :Д=>"Большому городу", :В=>"Большой город", :Т=>"Большим городом", :П=>"Большом городе", :П_о=>"о Большом городе", :род=>"Мужской", :множественное=>{:И=>"Большие города", :Р=>"Больших городов", :Д=>"Большим городам", :В=>"Большие города", :Т=>"Большими городами", :П=>"Больших городах", :П_о=>"о Больших городах"}, :где=>"в Большом городе", :куда=>"в Большой город", :откуда=>"из Большого города"}
>> text.singular('Д')
"Большому городу"
>> text.plural('Д')
@k1ife
k1ife / init.sql
Created May 9, 2016 12:37 — forked from vadv/init.sql
bench postgresql
psql -c 'create database pgbench'
psql -c 'create database results'
psql -c '
CREATE TABLE testset(
set serial PRIMARY KEY,
info text
);
CREATE TABLE tests(
test serial PRIMARY KEY,

TL;DR

sudo pg_dropcluster 9.4 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main

@k1ife
k1ife / 0_reuse_code.js
Created June 20, 2014 16:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@k1ife
k1ife / cities.rb
Last active August 29, 2015 14:02
getting from Geonames.org only needed cities with theirs own names and saveing them into my table
require 'mysql2'
@country_id = 0
@country_title = ''
@country_title_en = ''
@region_id = 0
@region_title = ''
@region_title_en = ''
@region_title_alt = ''
@k1ife
k1ife / regions.rn
Last active August 29, 2015 14:02
getting from Geonames.org only needed regions with theirs own names and saveing them into my table
require 'mysql2'
@title = []
@title_en = []
@title_alt = []
@title_str = ''
@title_en_str = ''
@title_alt_str = ''
@k1ife
k1ife / countries.rb
Last active August 29, 2015 14:02
getting from Geonames.org only needed countries with theirs own names and saveing them into my table
require 'mysql2'
@alternatename = []
@currencyco = []
@languageco = []
@title = ''
@title_en = ''
@title_alt = ''
@k1ife
k1ife / gist:0ec82a2cd8deb13b82e2
Last active August 29, 2015 14:01
Добываем все атрибуты модели
Amenity.first.attributes.except("id").keys.each do |ama|
puts ama
end
@k1ife
k1ife / gist:11375643
Created April 28, 2014 15:35
server check
#!/usr/bin/env bash
# Description: some cool descr here...
# params: print only, or send
# thanks to github.com/lesovsky/uber-scripts
company="1+1"
psqlCmd="psql -tXAF: -U postgres"
export PATH="/usr/bin:/usr/local/bin:/usr/sbin:/usr/local/sbin:/bin:/sbin"
PARAM="$@"