Using:
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
module Jekyll | |
class Pagination < Generator | |
# This generator is safe from arbitrary code execution. | |
safe true | |
# Generate paginated pages if necessary. | |
# | |
# site - The Site. | |
# |
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
# Patches Jekyll's built-in pagination to work with files *other* than the base index.html. | |
# Expects the following to be specified in your _config.yml: | |
# | |
# paginate_base: "blog" # Puts all pagination folders in the "blog" dir, e.g. "/blog/page2" | |
# paginate_index: "blog/index.html" # Paginates using the specified file | |
module Jekyll | |
class Page | |
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
/** | |
* Setup Module with `highlight` filter | |
*/ | |
var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) { | |
$locationProvider.html5Mode(false); | |
}); | |
JekyllApp.filter('highlight', function () { | |
return function (text, filter) { |
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
import Control.Monad | |
import Control.Concurrent | |
import Control.Concurrent.STM | |
import System.Random | |
import Text.Printf | |
-- Forks | |
type Fork = TMVar Int | |
newFork :: Int -> IO Fork |
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
#!/bin/sh | |
# | |
# Upload image(s) to imgur.com | |
# Copyright (C) 2014 Vivien Didelot <vivien@didelot.org> | |
# Licensed under GPL version 3, see http://www.gnu.org/licenses/gpl.txt | |
# | |
# Requires "jshon": | |
# http://kmkeen.com/jshon/ | |
# | |
# Alternatives, which suck: |
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
angular.module('hf.events.builder', [ | |
'app.resources', | |
'app.values' | |
]) | |
.factory('EventBuilder', function ($injector, $window, apiUrl) { | |
var EventBuilder = function EventBuilder(message) { | |
this['@timestamp'] = new Date(); | |
this['@message'] = message || ''; | |
return this; | |
}; |
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
# Varnish caching | |
## List of 300 items | |
Requests per second: 6717.35 [#/sec] (mean) # RESTful Memcache render cache. | |
Requests per second: 7096.14 [#/sec] (mean) # RESTful Database render cache. | |
Requests per second: 6379.45 [#/sec] (mean) # RESTful No render cache. | |
Requests per second: 95.24 [#/sec] (mean) # RESTWS | |
Requests per second: 1125.62 [#/sec] (mean) # Services | |
## List of 50 items | |
Requests per second: 6632.03 [#/sec] (mean) # RESTful Memcache render cache. | |
Requests per second: 7057.74 [#/sec] (mean) # RESTful Database render cache. |
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
# do it once | |
seq 1 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# do it twice | |
seq 2 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# do it 4 times, but at 2 a time | |
seq 4 | parallel -n0 -j2 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# you can also put all your commands into a file |
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
docker run --rm --name=ch -p=0.0.0.0:8484:8484 -p=0.0.0.0:2222:2222 \ | |
-p=0.0.0.0:4444:4444 -p=0.0.0.0:5920:5900 \ | |
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 \ | |
-e VNC_PASSWORD=hola -e WITH_GUACAMOLE=true \ | |
-e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" \ | |
elgalu/selenium:v2.46.0-base1 |
OlderNewer