Skip to content

Instantly share code, notes, and snippets.

View attenzione's full-sized avatar

Sergey Margaritov attenzione

View GitHub Profile
@attenzione
attenzione / apps.txt
Last active April 29, 2023 21:04
Android TV safe to uninstall stock/vendor apps
com.google.android.videos
com.phorus.playfi.tv
org.droidtv.amazonalexa
org.droidtv.demome
org.droidtv.eum
org.droidtv.freeviewplayers
org.droidtv.nettv.market
org.droidtv.nettvrecommender
org.droidtv.playtv
tv.inscape.tvclient.inscapeacr
@attenzione
attenzione / .scss-lint.yml
Created August 3, 2016 14:22
scss-lint config
# Default application configuration that all configurations inherit from.
scss_files: "**/*.scss"
plugin_directories: ['.scss-linters']
# List of gem names to load custom linters from (make sure they are already
# installed)
plugin_gems: []
linters:
[
{ "keys": ["super+u"], "command": "upper_case" },
{ "keys": ["super+l"], "command": "lower_case" },
{ "keys": ["super++shift+'"], "command": "change_quotes" },
// Multiple carets
{ "keys": ["alt+up"], "command": "select_lines", "args": { "forward": false } },
{ "keys": ["alt+down"], "command": "select_lines", "args": { "forward": true } }
]
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
cd /usr/local/var/
mkdir postgres-9.2.1
initdb /usr/local/var/postgres-9.2.1/
pg_upgrade --old-datadir /usr/local/var/postgres --new-datadir /usr/local/var/postgres-9.2.1 --old-bindir /usr/local/Cellar/postgresql/9.1.5/bin/ --new-bindir /usr/local/Cellar/postgresql/9.2.1/bin/
mv postgres postgres-9.1.5
mv postgres-9.2.1 postgres
rm analyze_new_cluster.sh
rm delete_old_cluster.sh
@attenzione
attenzione / boolean_value.rb
Last active June 11, 2020 08:22
Ruby: casting to boolean value
class BooleanValue
# https://github.com/rails/rails/blob/master/activemodel/lib/active_model/type/boolean.rb
FALSE_VALUES = [
false, 0,
"0", :"0",
"f", :f,
"F", :F,
"false", :false,
"FALSE", :FALSE,
"off", :off,
@attenzione
attenzione / normalize_mousewheel.js
Created May 10, 2014 15:35
Normalize mousewheel event across browsers
// http://stackoverflow.com/questions/5527601/normalizing-mousewheel-speed-across-browsers
function normalize_mousewheel(e) {
var //o = e.originalEvent,
o = e,
d = o.detail, w = o.wheelDelta,
n = 225, n1 = n-1;
// Normalize delta
d = d ? w && (f = w/d) ? d/f : -d/1.35 : w/120;
@attenzione
attenzione / checkbox.input.scss
Last active August 29, 2015 13:56
Custom Checkbox implementation for Simple Form
div.input.checkbox {
label.custom {
input[type=checkbox] {
position: absolute; left: -10000px; opacity: 0;
}
span.tick {
display: inline-block; width: 17px; height: 17px;
position: relative; top: 4px;
border: 1px solid $color-border; border-radius: 3px;
background-color: #fff;
/*
* jQuery Double Tap
* Developer: Sergey Margaritov (github.com/attenzione)
* License: MIT
* Date: 22.10.2013
* Based on jquery documentation http://learn.jquery.com/events/event-extensions/
*/
(function($){