Most of the hard work is done by @nateevans https://gist.github.com/nateevans/9958390
Thank you!
Requires Twig ^1.2 | ^2.0
{% extends 'knp_menu.html.twig' %}
#!/usr/bin/perl | |
use utf8; | |
use strict; | |
use warnings; | |
use Protocol::WebSocket::Handshake::Client; | |
use Protocol::WebSocket::Frame; | |
use IO::Socket; | |
use IO::Select; |
#!/bin/bash | |
# This script will make a best-effort attempt at showing modifications | |
# to package-provided config files on a Debian system. | |
# | |
# It's subject to some pretty significant limitations: most notably, | |
# there's no way to identify all such config files. We approximate the | |
# answer by looking first at dpkg-managed conffiles, and then hoping | |
# that most of the time, if maintainer scripts are managing files | |
# themselves, they're using ucf. So, DO NOT TRUST THIS SCRIPT to find |
using System; | |
using System.Linq; | |
using Autofac; | |
using Autofac.Core; | |
using NLog; | |
using log4net; | |
using LogManager = NLog.LogManager; | |
namespace AutofacIdea | |
{ |
# ~/.config/ReText project/ReText.conf | |
[General] | |
autoSave=true | |
restorePreviewState=true | |
highlightCurrentLine=true | |
tabWidth=2 | |
styleSheet=github.css | |
useWebKit=true | |
autoPlainText=false |
import os | |
import asyncio | |
import sys | |
from asyncio.streams import StreamWriter, FlowControlMixin | |
reader, writer = None, None | |
@asyncio.coroutine | |
def stdio(loop=None): |
from __future__ import print_function | |
import time | |
def query_10k(cur): | |
t = time.time() | |
for _ in range(10000): | |
cur.execute("SELECT 1,2,3,4,5") | |
res = cur.fetchall() | |
assert len(res) == 1 | |
assert res[0] == (1,2,3,4,5) |
#!/usr/bin/env python | |
""" | |
Helper to create a Hetzner root server style Network. | |
At Hetzner the gateway blocks alls MAC's except the | |
one of the route server, this means you need to proxy_arp | |
your virtual hosts. | |
Known bugs: | |
- pingAll doesn't seem to work right with this. | |
""" |
import QtQuick 2.4 | |
Column { | |
width: parent.width | |
height: parent.height | |
property alias model: columnRepeater.model | |
Repeater { | |
id: columnRepeater |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
Most of the hard work is done by @nateevans https://gist.github.com/nateevans/9958390
Thank you!
Requires Twig ^1.2 | ^2.0
{% extends 'knp_menu.html.twig' %}