Skip to content

Instantly share code, notes, and snippets.

View Freeaqingme's full-sized avatar
💭
Hello? Is this thing on?

Dolf Schimmel Freeaqingme

💭
Hello? Is this thing on?
View GitHub Profile
<account>
<email></email>
<password>9d2b71632e938864792d67a79d5dd385</password>
</account>
exec { "memcached-instance-create-socket-${name}":
command => "timeout 0.5 memcached -u root -a 600 -s ${socket_path}",
creates => $socket_path,
returns => 124,
user => root,
before => Service ["memcached-${name}"],
}
file { $socket_path:
ensure => file,
dolf@dolf-ThinkPad-T530{~/Projects/Puppetmaster/environments/production/modules/openssh}:git diff --patch
diff --git a/manifests/key.pp b/manifests/key.pp
index c83498a..87d9224 100644
--- a/manifests/key.pp
+++ b/manifests/key.pp
@@ -97,11 +97,11 @@ define openssh::key (
$module_dir = get_module_path('openssh')
if generate(
- "${module_dir}/scripts/generate_keys.sh",
<?php
$stringa = 'a';
for ($i = 0; $i < 100000; $i++) {
$string = str_repeat('a', $i*10000);
echo $i*10000 . ' ';
$stop = [];
for ($j=0; $j<50; $j++) {
$start = microtime(true);
$result = (strlen($stringa) !== strlen($string));
@Freeaqingme
Freeaqingme / gist:5653829
Last active December 17, 2015 18:29
Cross browser test stuff
<?php
switch ($_SERVER['HTTP_HOST']) {
case 'aa.nl':
case 'www.aa.nl':
case 'mijn.aa.nl':
if (count($_COOKIE) >0 ) {
echo 'In the past 5 minutes a cookie was set:';
root@dolf-ThinkPad-T530:/etc/ppp# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 3c:97:0e:22:16:04 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.169/23 brd 172.17.1.255 scope global eth0
inet6 2001:470:7bf0:0:18d0:9406:bb7f:adf6/64 scope global temporary dynamic
# Auth.conf
path ~ ^/file_metadata/private/
allow *
path ~ ^/private/
allow *
path ~ ^/production/file_metadata/private/
allow *
nirv@2001:19f0:1619:c9::c805:4072
<caterwaul> in fail2ban, how do I block all of Russia and China in the iptables?
<Freeaqingme> hi
<Freeaqingme> do I know you?
<caterwaul> uhhhhh
<caterwaul> you're the same species as me living on the same planet
<caterwaul> you're more closely related to me than to any other animal on this planet
<caterwaul> just call me brother.
<Freeaqingme> okay. I see.
@Freeaqingme
Freeaqingme / gist:5501135
Created May 2, 2013 09:19
Centos, or Ubuntu?
dolf@dolf-ThinkPad-T530{~/Projects/Centos}:vagrant box add CentOS6.2 http://packages.vstone.eu/vagrant-boxes/centos/6.2/centos-6.2-64bit-puppet-vbox.4.1.18.box
[vagrant] Downloading with Vagrant::Downloaders::HTTP...
[vagrant] Downloading box: http://packages.vstone.eu/vagrant-boxes/centos/6.2/centos-6.2-64bit-puppet-vbox.4.1.18.box
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
dolf@dolf-ThinkPad-T530{~/Projects/Centos}:vagrant init
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
@Freeaqingme
Freeaqingme / gist:5284846
Created April 1, 2013 13:08
My puppet ENC
#!/usr/bin/env ruby
require 'yaml'
hostname = ARGV[0]
yamlOut = { 'classes' => {}, 'parameters' => {} }
if hostname[-15..-1] == '.dev.enrise.net'
yamlOut['parameters']['zone'] = 'dev'