Skip to content

Instantly share code, notes, and snippets.

View typoworx-de's full-sized avatar

typoworx-de

View GitHub Profile
@InQuize
InQuize / NUT Client for ESXi 6.0U1.md
Last active February 2, 2023 12:49
NUT Client for ESXi 6.0U1.md

NUT Client for ESXi 6.0 Update 1 and below

Installation

NOTE: This package is not supported by VMWare and may cause problems in some cases like updating ESXi. So it is recommended to uninstall the VIB prior to major system changes. NOTE: NUT has its own official IANA port: 3493/TCP.

@jamiejackson
jamiejackson / mailcatcher.service
Created January 6, 2016 19:34
MailCatcher Systemd Service / Daemon
[Unit]
Description=MailCatcher Service
After=network.service vagrant.mount
[Service]
Type=simple
ExecStart=/usr/local/bin/mailcatcher --foreground --ip 10.0.2.15
[Install]
WantedBy=multi-user.target
@tullmann
tullmann / waitForX
Created November 13, 2015 19:02
wait for an X11 server to be ready (good for running under XVFB when testing chrome)
#!/bin/bash
#
# waitForX [<cmd> [<arg> ...]]
#
# Wait for X Server to be ready, then run the given command once X server
# is ready. (Or simply return if no command is provided.)
#
function LOG {
echo $(date -R): $0: $*
@xjamundx
xjamundx / blog-webpack-2.md
Last active November 7, 2024 13:10
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

<?php
$rbls = [
'b.barracudacentral.org',
'cbl.abuseat.org',
'http.dnsbl.sorbs.net',
'misc.dnsbl.sorbs.net',
'socks.dnsbl.sorbs.net',
'web.dnsbl.sorbs.net',
'dnsbl-1.uceprotect.net',
@Tuurlijk
Tuurlijk / AdditionalConfiguration.php
Created January 7, 2015 10:43
Disable TYPO3 extension in production environment
if (!empty($_SERVER['CONTEXT'])) {
if (TYPO3_MODE == 'FE' && $_SERVER['CONTEXT'] === 'Production') {
// Avoid cookie set by session_start in rsaauth
if (isset($TYPO3_CONF_VARS['EXT']['ignoredExt'])) {
$TYPO3_CONF_VARS['EXT']['ignoredExt'] .= ',rsaauth';
} else {
$TYPO3_CONF_VARS['EXT']['ignoredExt'] = 'rsaauth';
}
}
}
@AD7six
AD7six / https-all-the-things.conf
Last active June 21, 2016 07:54
A single redirect for your cloudflare app for http to https, and www.example.com (and olddomain.com etc.) to example.com
# Copy and paste into your .htaccess file or include in your apache conf files
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"' [OR]
RewriteCond %{HTTP_HOST} !^example.com$ [NC]
RewriteRule ^(.*)$ https://example.com/$1 [R=301,L]
# And remember to always use https for future requests
Header set Strict-Transport-Security "max-age=16070400; includeSubDomains"
@joostrijneveld
joostrijneveld / gpg2qrcodes.sh
Created May 20, 2014 19:43
Producing printable QR codes for persistent storage of GPG private keys
# Heavily depends on:
# libqrencode (fukuchi.org/works/qrencode/)
# paperkey (jabberwocky.com/software/paperkey/)
# zbar (zbar.sourceforge.net)
# Producing the QR codes:
# Split over 4 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 4 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done
@juanje
juanje / Description.md
Last active November 30, 2023 19:29
Limit Chrome from eating all the memory and CPU

I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.

As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin and add the following group to the file /etc/cgconfig.conf:

group browsers {
    cpu {
#       Set the relative share of CPU resources equal to 25%
        cpu.shares = "256";
 }
@ktmud
ktmud / gulpfile.js
Last active February 28, 2022 10:39
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')