Updated: Just use qutebrowser (and disable javascript). The web is done for.
#!/usr/bin/env python | |
import redis | |
r = redis.StrictRedis(host='localhost', port=6379, db=0) | |
# To debug code on a single key you can use this instead of the for loops: | |
# key = r.randomkey() | |
# Delete all keys not accessed since 'idletime' | |
for key in r.scan_iter("*"): | |
idle = r.object("idletime", key) |
<?php | |
namespace App\Providers; | |
use Illuminate\Http\Request; | |
use Illuminate\Routing\Route; | |
use Illuminate\Support\ServiceProvider; | |
use App\Http\Middleware\CaptureRequestExtension; | |
class AppServiceProvider extends ServiceProvider |
function mergeSort(arr) { | |
// | |
// If your array has a length less than 2, congratulations! It's already sorted. | |
if(arr.length < 2) { | |
return arr; | |
} | |
// Otherwise, cut your array in half, and consider the two sub-arrays separately. | |
var firstLength = arr.length / 2; | |
var firstHalf = arr.slice(0, firstLength); | |
console.log('firstLength', firstLength); |
This page provides a full overview of PHP's SessionHandler
life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and
what you can expect will be called in your custom SessionHandler
implementation.
Each example is a separate script being run by a client with cookies enabled.
To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="utf-8" /> | |
<script src="templating.js" type="text/javascript" charset="utf-8"></script> | |
</head> | |
<body> | |
<template id=t> |
#!/usr/bin/env bash | |
# Source: https://gist.github.com/jordan-brough/48e2803c0ffa6dc2e0bd | |
# See also: https://stackoverflow.com/a/25095062/58876 | |
# Download this script as "git-recent" (no extension), chmod it to be executable and put it in your | |
# path somewhere (e.g. /usr/bin). You can then use it via `git recent` from inside any git repo. | |
# Examples: |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
To search Stack Overflow from alfred app, simply copy and paste below into the alfred search box, when you press enter you shoudl see a dialog asking you to install this custom Search.
alfred://customsearch/Search%20StackOverflow%3A%20%7Bquery%7D/stack/utf8/noplus/http://stackoverflow.com/search?q={query}
Then to use it in alfred simply up the search box and type in stack
and the question your asking.