- Set up iCloud Keychain
- Remove icons and hide Dock
- Default address in iMessage
- Install Updates
- Add Ru Input Sources
- Set up Shortcuts
- Add text shortcuts Text
module Main exposing (..) | |
import RemoteData exposing (WebData, RemoteData(..), asCmd, fromTask) | |
import Html exposing (Html, text, div, input, br) | |
import Html.Events exposing (onClick) | |
import Html.Attributes exposing (type_, value) | |
import Http exposing (get, toTask) | |
import Json.Decode exposing (Decoder, string) | |
import Json.Decode.Pipeline exposing (decode, required) | |
import Random exposing (int, generate) |
// setup | |
var value = false; | |
setTimeout(function(){ | |
value = true; | |
}, 1998); | |
// code | |
function promiseWhen(condition, timeout){ | |
if(!timeout){ |
#!/bin/bash | |
# | |
# Run a security update on a Drupal 7 site | |
# | |
# Requires the bash function ask_yes_no() | |
# https://gist.github.com/drclaw/a39c7272413f2f8ba860 | |
# | |
function drush_security_update() { |
map $uri $drupal_dir { | |
~^/(?<dir>[^/]*)/ $dir; | |
} |
<?php | |
/** | |
* Migration class for migrating the source translations. | |
*/ | |
class MySourceTranslationMigration extends Migration { | |
// Nothing special here. Just set up a node migration, migrating to nodes | |
// that will serve as translation sources. | |
// ... |
## This relies on using Lua. In particular the header_filter_by_lua. The solution is based | |
## on the presence of the Etag header for the drupal maintenance page (theme). For a real 503 | |
## there's no Etag. We set the header X-Maintenance to YES in that case. Now you can distinguish | |
## between a real 503 and the Drupal maintenance page. | |
error_page 503 = @503; | |
location @503 { | |
header_filter_by_lua ' | |
if ngx.header.etag ~= "" then |
This is just a quick response to http://me.veekun.com/blog/2012/07/28/quick-doesnt-mean-dirty/. I won't bother to write a proper blog post for this, so a Gist will have to do ;)
When I read that article, one thing really striked me: If you want to quickly create a web app in PHP, you do exactly the same. I mean, exactly.
I never used the Silex microframework before, so I took this as a chance to see how it works. I'll just do the same as eevee did, only with a bit less commentary (this is a Gist after all!)
I hope that this will show you that PHP and Python are really similar to work with. Also this should show that just because you're using PHP, doesn't mean that you write dirty code. The similarity in the process and code is really incredible :)
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |