Skip to content

Instantly share code, notes, and snippets.

View denisinla's full-sized avatar
👋

denisinla

👋
View GitHub Profile
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@juffee
juffee / settings.json
Created January 2, 2014 17:34
transmission settings
{
"alt-speed-down": 400,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
@gaspanik
gaspanik / do_nginx-gzip.markdown
Created January 7, 2014 01:06
Gzip setting on Digital Ocean's Nginx
    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;

gzip_buffers 16 8k;

@amolkhanorkar
amolkhanorkar / PG::Error: ERROR: new encoding (UTF8) is incompatible
Last active November 29, 2023 17:57
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
@acusti
acusti / google-analytics.js
Last active November 7, 2017 00:23 — forked from ismyrnow/google-analytics-amd.js
Barebones google analytics RequireJS module wrapper for “universal analytics” with example of how to use it within a single page application
/**
* Google analytics include (using "Universal Analytics")
* https://gist.github.com/acusti/8718758
*/
/*global define */
define(function(require) {
'use strict';
@fousa
fousa / deploy.rb
Last active January 29, 2016 18:08
Deploy with mina on DigitalOcean server.
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm'
require 'mina_sidekiq/tasks'
set :rails_env, 'production'
set :domain, 'YOUR_IP_OR_DOMAIN'
set :deploy_to, "/home/rails/#{rails_env}"
set :repository, 'git@github.com:fousa/<YOUR_REPOSITORY>.git'
@nathansmith
nathansmith / scroll-offset.js
Last active November 27, 2023 04:51
Check if the user is scrolled to the bottom of the page.
window.onscroll = function() {
var d = document.documentElement;
var offset = d.scrollTop + window.innerHeight;
var height = d.offsetHeight;
console.log('offset = ' + offset);
console.log('height = ' + height);
if (offset >= height) {
console.log('At the bottom');
@Nimdis
Nimdis / gist:9032462
Created February 16, 2014 10:55
undo last git push
git push -f origin HEAD^:master
@staydecent
staydecent / styles.less
Last active June 4, 2021 04:44
Smaller, more compact tab-bar for Atom.io
.tab-bar {
height: 34px;
padding: 0;
.tab {
-webkit-transform: none;
top: 2px;
line-height: 25px;
&.active {
@miguelmota
miguelmota / README.md
Last active May 15, 2024 07:48
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/