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
#!/usr/bin/env ruby | |
def changelog_for_gem(gem) | |
changelogs = `bundle exec gem contents #{gem}`.lines.grep(/history|changelog|news/i) | |
if changelogs.empty? | |
puts "No changelog found for gem #{gem}" | |
return nil | |
end |
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
<?php | |
require 'autoload.php'; | |
$redis = new Predis\Client('tcp://127.0.0.1', 'dev'); | |
// *** NOTE *** Lua's unpack() has a limit on the size of the table imposed by | |
// the number of Lua stack slots that a C function can use. This value is defined | |
// by LUAI_MAXCSTACK in luaconf.h and for Redis is set to 8000, which translates | |
// to an hash of 4000 elements since HGETALL returns a list that interleaves field |
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
require 'luarocks.require' | |
require 'mercury' | |
require 'redis' | |
module('redis_app', package.seeall, mercury.application) | |
local templates = { | |
index = [[ | |
<html> |
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
require 'luarocks.require' | |
require 'redis' | |
-- See "WATCH explained" from http://redis.io/topics/transactions | |
--[[ | |
./redis-cli ZADD zset 1 a | |
./redis-cli ZADD zset 2 b | |
./redis-cli ZADD zset 3 c | |
]] |
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
<?php | |
require __DIR__.'/../autoload.php'; | |
function group_keys_by_slot(\Predis\Cluster\StrategyInterface $strategy, array $keys) { | |
$keysBySlot = []; | |
foreach ($keys as $key) { | |
$slot = $strategy->getSlotByKey($key); |
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
FROM gogs/gogs:latest | |
RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && apk --no-cache add shadow | |
RUN usermod -u 1100 git && groupmod -g 1100 git |
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
prefvmx.allVMMemoryLimit = "3000" ; Limite massimo di RAM host utilizzabile dalle VM (in megabyte, es. 3GB) | |
prefvmx.minVmMemPct = "100" ; Usa solo la RAM host per allocare memoria guest | |
prefvmx.useRecommendedLockedMemSize = "TRUE" ; Prealloca tutta la memoria del guest all'avvio della VM | |
mainMem.useNamedFile = "FALSE" ; Disabilita i file .vmem per lo swap di memoria guest |
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
<?php | |
namespace Nrk\Predis; | |
use Nrk\Predis\Connection\MasterSlaveWrapperConnection; | |
use Predis\Cluster\Distribution\HashRing; | |
use Predis\Connection\PredisCluster; | |
use Predis\Option\ClientOptions; | |
class MasterSlaveClusterInitializer |
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
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
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
adaniele@psamathe ~/Desktop % ./video-bitrate.rb 20120315_15s.mp4 | spark | |
▃▆▃▂▃▆█▆▅▇▆▅▇▆▆▁ |