Skip to content

Instantly share code, notes, and snippets.

View opichals's full-sized avatar

Standa Opichal opichals

  • Prague, Czech Republic
View GitHub Profile
@JPvRiel
JPvRiel / ubunut_network_manager_docker_dns_workaround.md
Last active July 18, 2022 23:09
Ubuntu, NetworkManager and Docker DNS workaround

Docker issues are frequently logged for DNS resolution in containers because it doens't inhert or get values for DNS from NetworkManager which leverages a built in dnsmasq to inteligently manage DNS.

Perminant workarround

sudo bash -c "echo listen-address=$(ip -4 addr show dev docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') > /etc/NetworkManager/dnsmasq.d/docker-bridge"
sudo systemctl reload NetworkManager
sudo bash -c 'echo -e "{\n\t\"dns\": [\"$(ip -4 addr show dev docker0 | grep -oP "(?<=inet\s)\d+(\.\d+){3}")\"]\n}" > /etc/docker/daemon.json'
sudo systemctl restart docker
@rgranadino
rgranadino / gwsdecoder.php
Created August 23, 2012 04:43
D-Link gws file decoder
#/usb/bin/php
<?php
//author rgranadino aug 22 2012
//tested on a D-Link DIR-615 B2 v2.25 firmware.
//this is a php translation of:
// http://www.shulerent.com/2009/08/21/cracking-the-d-link-settings-file/
$file = $argv[1];
if (!is_readable($file)) {
echo "Cannot read file: $file\n";
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 27, 2024 18:27
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@haschek
haschek / .jshintrc
Created May 4, 2012 16:08
JSHint Configuration, Strict Edition
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true