⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
*/ | |
function getTitle() { | |
var re = /^Humble.*Bundle\:\ (.*)\ \(/g; | |
return re.exec(document.title)[1]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
plex: | |
image: linuxserver/plex | |
container_name: plex | |
volumes: | |
- /path/to/plex/config:/config | |
- /path/to/plex/Movies:/data/movies | |
- /path/to/plex/Shows:/data/tvshows | |
- /path/to/plex/transcode:/data/transcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
*/ | |
$('a').each(function(i){ | |
if ($.trim($(this).text()) == 'MOBI') { | |
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule EctoBatchStream do | |
import Ecto.Query, only: [from: 1, from: 2] | |
@batch_size 1000 | |
# Example: | |
# | |
# query = from u in MyApp.User, select: u.email | |
# stream = EctoBatchStream.stream(MyApp.Repo, query) | |
# stream |> Stream.take(3) |> Enum.to_list # => […] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StandardError | |
SQLite3::Exception | |
SQLite3::MemoryException | |
SQLite3::LockedException | |
SQLite3::BusyException | |
SQLite3::AbortException | |
SQLite3::PermissionException | |
SQLite3::InternalException | |
SQLite3::SQLException | |
SQLite3::NotADatabaseException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
As configured in my dotfiles.
start new:
tmux
start new with session name:
YARD CHEATSHEET http://yardoc.org
May 2020 - updated fork: https://gist.github.com/phansch/db18a595d2f5f1ef16646af72fe1fb0e
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
Esto es un listado de pregunta a incluir en una encuesta, no hace falta que las respondáis ahora, luego crearé un formulario en google, lo que si podéis hacer es añadir vuestras preguntas.
¿Sueles maldecir mientras programas?
- No
- A veces cuando algo se me atasca y entro en modo berserker.
- Continuamente.
¿Escuchas música mientras programas?
NewerOlder