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
@Freeaqingme
Freeaqingme / github.css
Last active December 18, 2015 18:29
github.com user style css Example: http://img801.imageshack.us/img801/346/szxn.png
/**
* Example: http://img801.imageshack.us/img801/346/szxn.png
**/
.repository-with-sidebar .repository-sidebar{
float: none !important;
overflow: visible !important;
width: 100% !important;
/*width: 650px !important;*/
margin-bottom: -350px;
#!/usr/bin/perl -w
# start-memcached
# 2003/2004 - Jay Bonci <jaybonci@debian.org>
# This script handles the parsing of the /etc/memcached.conf file
# and was originally created for the Debian distribution.
# Anyone may use this little script under the same terms as
# memcached itself.
use POSIX qw(setsid);
if(open $etchandle, $etcfile)
{
foreach my $line (<$etchandle>)
{
$line ||= "";
$line =~ s/\#.*//g;
$line =~ s/\s+$//g;
$line =~ s/^\s+//g;
next unless $line;
next if $line =~ /^\-[dh]/;
<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 *