Matches all defs, including multi-line defs:
def\s+\w+\(((?!\):).|\n)+\):
Matches all instances of ={
and =[
:
=(\[|\{)
discovery:~% ssh heap01 'df -h | grep osd' | |
/dev/sdb1 2.8T 2.3T 463G 84% /var/lib/ceph/osd/ceph-0 | |
/dev/sdc1 2.8T 2.1T 646G 77% /var/lib/ceph/osd/ceph-4 | |
/dev/sdd1 2.8T 2.3T 521G 82% /var/lib/ceph/osd/ceph-6 | |
discovery:~% ssh heap02 'df -h | grep osd' | |
/dev/sdb1 2.8T 2.7T 53G 99% /var/lib/ceph/osd/ceph-1 | |
/dev/sdc1 1.9T 1.9T 2.4G 100% /var/lib/ceph/osd/ceph-3 | |
/dev/sdd1 2.8T 2.7T 80G 98% /var/lib/ceph/osd/ceph-5 | |
/dev/sde1 2.8T 929G 1.9T 34% /var/lib/ceph/osd/ceph-2 |
#!/usr/bin/env bash | |
## You can use this to crush images in parallel via the shell alone. | |
## Make sure the GNU parallel utility is installed: | |
## - apt-get install parallel | |
## - yum install parallel | |
## For a simple example, run the following to simulate with echo and sleep: | |
## ls --color=no /usr/share/doc | parallel -j 16 --gnu -i -- 'sh -c "sleep 0.5 && echo {}"' | |
## (-i tells parallel to substitute a filename when it sees {} in the command, rather than | |
## simply appending it to the command, as it would normally do if you omit -i) |
#!/bin/bash | |
# Since Ceph's TRIM/discard support for the rbd kernel module driver has been | |
# an open TODO for half a decade, this script attempts to boot up a minimal | |
# Ubuntu QEMU+KVM guest to do such bidding. Due to mysterious raisins, librbd | |
# has discard support, whereas the rbd kernel module does not... and QEMU uses | |
# librbd, hence this wasteful script. | |
# | |
# On "decent" server hardware at home, this completes in just under 60sec for | |
# a 100GB rbd image. | |
# |
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
def _leloo_multiparse(v): | |
parse_fn = None | |
try: | |
import pkg_resources |
/* | |
* Ugh. This code is pretty bad. But, it's the only basis I've been able | |
* to use successfully on OSX, since Apple stupidly auto-claims every single | |
* HID device on the system, making it unwritable via libusb, etc. unless you | |
* write an actual driver for it. | |
* | |
* So this will have to do. | |
*/ | |
/********************************************************************************* |
#include <stdio.h> | |
#define $$$ /**/ | |
int main(int argc, char* argv[]) { | |
$$$ $$$ $$$ $$$ printf("cashmoney indentation or bust\n"); | |
$$$ $$$ $$$ $$$ return 0; | |
} |
#!/usr/bin/env python | |
from __future__ import print_function | |
from heliotron import Bridge | |
# ...and by heliotron I mean https://github.com/briancline/heliotron | |
bridge = Bridge(ip='10.0.0.42', app_name='testscript') | |
lights = bridge.get_lights() | |
print('Good night!') |
Matches all defs, including multi-line defs:
def\s+\w+\(((?!\):).|\n)+\):
Matches all instances of ={
and =[
:
=(\[|\{)
discovery.dfw1:~% gitignore | |
zsh: do you wish to see all 112 possibilities (28 lines)? y | |
Actionscript Erlang Mercury Scrivener | |
Ada ExpressionEngine MetaProgrammingSystem Sdcc | |
Agda ExtJS-MVC Meteor SeamGen | |
Android Fancy Node SketchUp | |
AppceleratorTitanium Finale OCaml SugarCRM | |
ArchLinuxPackages ForceDotCom Objective-C Swift | |
Autotools Fortran Opa Symfony | |
Bancha FuelPHP OpenCart Symfony2 |