Skip to content

Instantly share code, notes, and snippets.

View zufrieden's full-sized avatar

Marc Friederich zufrieden

View GitHub Profile

Firefox write/read a lot on the disk. This can reduce the performance of other program.

In about:config

Reduce latency of session write

browser.sessionstore.interval to 600000 (1 hours)

This value is in ms.Default is 15000ms (every 15 seconde).

@RRethy
RRethy / gist:ad8a9a3b1112a48226ec3336fa981224
Last active May 1, 2024 03:05
Seamlessly editing remote files in (Neo)Vim with Netrw and scp

Seamlessly editing remote files in (Neo)Vim with Netrw and scp

Neovim and Vim both come bundled with a standard plugin called Netrw. Netrw acts a file explorer (similar to NERDTree), but more importantly has the ability to work with scp (as well as sftp, rcp, ftp, and lots of others :h netrw-nread) to let you edit files and browse directories that are hosted on a remote machine, inside of your local Vim instance.

This is useful since you are able to use your Vim setup and plugins without copying over your dotfiles to the remote machine. As well, since the file is copied to your local machine, there will be no delay when typing.

Setup

This is optional for Vim, but required for Neovim (check this Neovim issue explaining why).

@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@nateroling
nateroling / deploy.addendum.rb
Last active July 15, 2016 07:11
Roots Bedrock: Copy production assets for Roots theme
# The Roots theme by default does not check production assets into Git, so
# they are not deployed by Capistrano when using the Bedrock stack. The
# following will compile and deploy those assets. Copy this to the bottom of
# your config/deploy.rb file.
# Based on information from this thread:
# http://discourse.roots.io/t/capistrano-run-grunt-locally-and-upload-files/2062/7
# and specifically this gist from christhesoul:
# https://gist.github.com/christhesoul/3c38053971a7b786eff2
@ronaldsmartin
ronaldsmartin / GoogleSheetJson.md
Last active December 16, 2023 06:53
Google Spreadsheet JSON Queries

SheetAsJSON + Filtering

This is an extension of DJ Adams' excellent SheetAsJSON Google Apps Script, which provides a way to GET a published Google Spreadsheet as a JSON feed. This version allows generic filtering for terms, more specific control over which rows to parse, and correct MIME type for JSONP output.

Minimal Usage

The following parameters are required for the script to work.

https://script.google.com/macros/s/AKfycbzGvKKUIaqsMuCj7-A2YRhR-f7GZjl4kSxSN1YyLkS01_CfiyE/exec?
+ id=<spreadsheet key>
+ sheet=<sheet name on spreadsheet>
@Yago
Yago / image-center.scss
Created July 9, 2014 07:39
Sass - Image center
.logo-wrapper {
float:none !important;
position: relative;
display: inline-block;
max-width: 100%;
height: 200px !important;
margin: 0 auto !important;
padding: 0px !important;
text-align: center;
&:before {
@chexxor
chexxor / DishwasherAlgo.java
Created March 18, 2013 18:00
An algorithm for our company's dishwasher. Because people need instructions.
public class Dishwasher {
public enum StatusCode { READY_TO_WASH, WASHING, READY_TO_EMPTY }
public enum Reason { OK, FULL, MUST_REMOVE_DISHES, MUST_EXECUTE_WASH_CYCLE }
public Integer capacity {get; set;} // 0 - 100
public StatusCode status {get; set;}
public hasSoap {get; set;}
public Dishwasher() {
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.