Skip to content

Instantly share code, notes, and snippets.

@ip-2014
ip-2014 / Dockerfile
Created January 7, 2019 21:05 — forked from webD97/Dockerfile
complete minetest server dockerfile
FROM ubuntu:latest
RUN apt update && apt install build-essential cmake wget libirrlicht-dev libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev -y
RUN wget https://github.com/minetest/minetest/archive/master.tar.gz && tar xf master.tar.gz && mv minetest-master ./minetest && rm master.tar.gz
RUN wget https://github.com/minetest/minetest_game/archive/master.tar.gz && tar xf master.tar.gz && mv minetest_game-master ./minetest/games/minetest_game && rm master.tar.gz
WORKDIR /minetest
RUN cmake . -DRUN_IN_PLACE=TRUE -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE
RUN make -j $(nproc)
@ip-2014
ip-2014 / gist:7e1f147d68411e9850510b8f45e60b2a
Created December 6, 2018 21:37 — forked from simonw/gist:68d19a46e8edc2cd8c68
Fix "Do you want the application "python" to accept incoming network connections?" by code signing the python executable in your virtualenv - copied here in case https://www.darklaunch.com/2014/02/02/fix-do-you-want-the-application-python-to-accept-incoming-network-connections ever goes away.
With the OS X firewall enabled, you can remove the "Do you want the application "python" to accept incoming network connections?" message.
Create a self-signed certificate.
Open Keychain Access. Applications > Utilities > Keychain Access.
Keychain Access menu > Certificate Assistant > Create a Certificate...
Enter a Name like "My Certificate".
Select Identity Type: Self Signed Root
Select Certificate Type: Code Signing
Check the Let me override defaults box
@ip-2014
ip-2014 / pfsense-gce.md
Created September 26, 2017 02:18 — forked from mkhon/pfsense-gce.md
pfSense 2.2.2 on Google Compute Engine

Initial install (virt-manager on Linux)

virt-install --name pfsense --ram 1024 --vcpus=1 --os-variant freebsd7 --hvm --vnc \
--controller type=scsi,model=virtio-scsi --disk path=pfSense-2.2.2.raw,size=4,bus=scsi \
--network=bridge:br0,model=virtio \
--cdrom pfSense-LiveCD-2.2.2-RELEASE-amd64.iso

Configure vtnet0 as WAN.

Post-configuration

@ip-2014
ip-2014 / openvpn_on_google_cloud.md
Created September 20, 2017 19:14 — forked from neuni/openvpn_on_google_cloud.md
Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)

Install openVPN server on Google Cloud using Pritunl

Purpose:

Create a openVPN server on Google Cloud Platform to connect to your Google Cloud network using openVPN and/or to route your internet traffic through the VPN (Road Warrior Scenario)

Create instance

  • Create new instance in default network
  • Chosse Ubuntu 16.04 LTS
@ip-2014
ip-2014 / SSLPoke.java
Created May 10, 2017 16:20 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the commet #1 for howto.
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
@ip-2014
ip-2014 / ansible_conditionals_examples.yaml
Created May 8, 2017 19:49 — forked from marcusphi/ansible_conditionals_examples.yaml
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files:
@ip-2014
ip-2014 / route53-user-policy.json
Created October 27, 2016 15:56 — forked from dfox/route53-user-policy.json
An IAM policy for Amazon AWS to allow limited access to Route 53
{
"Statement":[
{
"Action":[
"route53:ChangeResourceRecordSets",
"route53:GetHostedZone",
"route53:ListResourceRecordSets"
],
"Effect":"Allow",
"Resource":[
@ip-2014
ip-2014 / update-route53-dns-config.sh
Created October 27, 2016 15:56 — forked from dfox/update-route53-dns-config.sh
Configuration file for the Route 53 update script
AWS_ACCESS_KEY_ID="<Your access key ID>"
AWS_SECRET_ACCESS_KEY="<Your secret access key>"
ZONE="<The name of your subdomain>"
TTL="600"
@ip-2014
ip-2014 / update-route53-dns.sh
Created October 27, 2016 15:56 — forked from dfox/update-route53-dns.sh
A script to update DNS on Route 53
#!/bin/sh
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Load configuration
. /etc/route53/config