Skip to content

Instantly share code, notes, and snippets.

View dandrzejewski's full-sized avatar
🥵

David Andrzejewski dandrzejewski

🥵
View GitHub Profile
@dandrzejewski
dandrzejewski / answer.md
Last active May 5, 2016 16:14 — forked from non/answer.md
Appeal of Dynamically typed languages

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

@dandrzejewski
dandrzejewski / crypto-wrong-answers.md
Created November 18, 2015 14:41 — forked from paragonie-scott/crypto-wrong-answers.md
An Open Letter to Developers Everywhere (About Cryptography)
@dandrzejewski
dandrzejewski / gist:3ccb9cae9ec60e2883333054011541da
Created April 28, 2016 21:00 — forked from weivall/gist:2595515
<meta name="format-detection" content="address=no;email=no" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
<meta name="format-detection" content="address=no;email=no" />
#!/bin/sh
# cron script for checking wlan connectivity
# change 192.168.1.1 to whatever IP you want to check.
IP_FOR_TEST="192.168.1.1"
PING_COUNT=1
PING="/bin/ping"
IFUP="/sbin/ifup"
IFDOWN="/sbin/ifdown --force"
@dandrzejewski
dandrzejewski / python_custom_openssl.diff
Created December 21, 2016 16:42 — forked from eddy-geek/ python_custom_openssl.diff
Compile python with statically linked openssl
--- a/setup.py 2014-03-17 03:31:31.000000000 +0100
+++ b/setup.py 2014-03-17 19:06:03.000000000 +0100
@@ -750,10 +750,8 @@
exts.append( Extension('_socket', ['socketmodule.c'],
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
- search_for_ssl_incs_in = [
- '/usr/local/ssl/include',
- '/usr/contrib/ssl/include/'
- ]
# disable secure boot in the bios, in menu security
# downlad and unzip refind-bin-0.7.8.zip
# install refind, assuming your ESP partition is /dev/sda1 and mounted in /boot/efi
cd refind-bin-0.7.8
./install.sh
# type y and go ahead
# at that time your boot entry should look like that
@dandrzejewski
dandrzejewski / homebridge
Created January 1, 2018 21:05 — forked from johannrichard/homebridge
Systemd Service for homebridge (http://github.com/nfarina/homebridge)
# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@dandrzejewski
dandrzejewski / varnish-purge-cache.sh
Created August 6, 2020 21:56 — forked from andrezrv/varnish-purge-cache.sh
Purge all Varnish cache.
# Purge all Varnish cache
varnishadm "ban req.url ~ /"
@dandrzejewski
dandrzejewski / dhcp_option119.py
Created November 28, 2020 01:39 — forked from SmartFinn/dhcp_option119.py
a script for converting domain names to DHCP Option 119 (Domain Search Option)
#!/usr/bin/env python3
"""Command generator for setting DHCP Option 119
This script converts the specified domain names to DHCP Option 119
(Domain Search Option) and prints commands for various DHCP servers.
USAGE:
./dhcp_option119.py DOMAIN ...
EXAMPLE:
<?php
/**
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI: http://ericteubert.de
* License: MIT
*/