Skip to content

Instantly share code, notes, and snippets.

View progress44's full-sized avatar
Drinking coffee

Ani Sinanaj progress44

Drinking coffee
View GitHub Profile
(From http://renebakx.nl/7/running-a-local-wildcard-dns-server-on-your-mac/)
Update for mavericks (10.9)
Named and bind are not packaged by default anymore, however the good people of menandmice provide a pre-compiled binary that saves you a lot of compiling with homebrew :)
Just go to http://support.menandmice.com/download/bind/macosx/10.9-Mavericks/ and download the ISCBIND-9.9.4-x86_64-10.9.zip package.
Unzip it, and you get a folder called __Parent__ with a subfolder called __Parent__ and the package called ISCBIND-9.9.4-x86_64-10.9.mpkg double click to install and follow the instructions down below
@progress44
progress44 / npm.config.sh
Created July 30, 2017 21:57
Setting unsafe-perms to true so node can access node_modules when set to root:root
npm config set unsafe-perm=true
@progress44
progress44 / audit.sh
Last active August 19, 2017 10:53
Audit ubuntu
#!/bin/bash
# install
apt-get install auditd audispd-plugins
# show active rules
auditctl -l
# setting a watch on the file /etc/passwd
# listens for permissions change
# Raspberry Pi, monitor temperature
watch -n 2 "vcgencmd measure_temp"
# Shut down rasbpi immediatly
sudo shutdown --no-wall -P 0
@progress44
progress44 / Dockerfile
Created December 1, 2017 21:34
Create a user in dockerfile
# Provide a non-root user to run the process.
RUN groupadd --gid 1000 username && \
useradd --uid 1000 --gid 1000 \
--home-dir /usr/share/username --no-create-home \
username
USER username
@progress44
progress44 / https.js
Last active July 17, 2018 09:36
Utility wrapping requests and enabling caching with redis for http requests
const https = require('https')
const qs = require('querystring')
const redis = require("redis")
const sha1 = require("sha1")
const url = require('url')
const util = require('util')
const client = redis.createClient({
host: config.redis.host,
port: config.redis.port,
@progress44
progress44 / tf.ipynb
Created August 5, 2018 12:38
A Jupyter notebook with a TensorFlow example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@progress44
progress44 / imdb.ipynb
Created August 7, 2018 11:10
IMDB text classification. TensorFlow example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@progress44
progress44 / unjar
Created September 18, 2018 22:11
Script to open aar and jar files
#!/bin/bash
unzip ${1}.${2} -d ${1} # or other extracting tool
# Change whatever you need
jar cvf ${1}_.${2} -C ${1} .