Skip to content

Instantly share code, notes, and snippets.

View lfilho's full-sized avatar

Luiz Gonzaga dos Santos Filho lfilho

View GitHub Profile
@douglasmiranda
douglasmiranda / 1ntro.markdown
Last active January 13, 2020 03:28
Django + git + apache mod_wsgi na Kinghost

#Django + git + apache mod_wsgi na Kinghost

NOTE: Atualmente não é necessário tanto para fazer deploy de aplicações Django na Kinghost.

I hope you like it!

##Início

Talvez você não queira ficar digitando a senha toda vez que usar o ssh, então adicione sua chave pública ao seu host:

@ofca
ofca / $.3.js
Last active February 20, 2021 13:30
// based on https://gist.github.com/Potfur/5576225 & https://github.com/james2doyle/saltjs
// more info: https://plus.google.com/109231487156400680487/posts/63eZzzrBSb6
window.$ = function(s) {
var c = {
'#': 'ById',
'.': 'sByClassName',
'@': 'sByName',
'=': 'sByTagName'}[s[0]];
return document[c?'getElement'+c:'querySelectorAll'](s.slice(1))
};
// This post will briefly explain (omiting, skipping some parts) in code what is
// Functor, Pointed Functor, Monad and Applicative Functor. Maybe by reading the
// code you will easily grasp these functional concepts.
// if you only want to run this code go to:
// https://jsfiddle.net/leandromoreira/buq5mnyk/
// or https://gist.github.com/leandromoreira/9504733c7f8c6361c46270ea953d8409
// This code requires you to have require.js loaded (or you can load ramda instead :P)
requirejs.config({
@romainl
romainl / Vim_pushing_built-in_features_beyond_their_limits.markdown
Last active September 19, 2023 08:16
Vim: pushing built-in features beyond their limits

Vim: pushing built-in features beyond their limits

The situation

Searching can be an efficient way to navigate the current buffer.

The first search commands we learn are usually / and ?. These are seriously cool, especially with the incsearch option enabled which lets us keep typing to refine our search pattern. / and ? really shine when all we want is to jump to something we already have our eyeballs on but they are not fit for every situation:

  • when we want to search something that's not directly there, those two commands can make us lose context very quickly,
  • when we need to compare the matches.
@Kolenov
Kolenov / README.md
Created October 18, 2020 22:52 — forked from ascendbruce/README.md
Use mac style shortcuts on Windows with AutoHotkey (ahk) script

Use (most) macOS style shortcuts on Windows

Make Windows PC's shortcut act like macOS (Mac OS X)

With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.

Note that

  1. You should disable the Between input languages shotcut from Control Panel\Clock, Language, and Region\Language\Advanced settings > Change lanugage bar hot keys because it conflicts with cmd + shift + ↑ / ↓ / ← / → (select text between cursor and top / bottom / beginning of line / end of line)
  2. you shouldn't change the modifier keys mapping with keyboard DIP. This script assumes you use a standard PC keyboard layout, and wish to use shortcuts as if it was a mac keyboard layout.