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
# Shut down rasbpi immediatly
sudo shutdown --no-wall -P 0
# Raspberry Pi, monitor temperature
watch -n 2 "vcgencmd measure_temp"
@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
@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
(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 / sslrenewal
Created June 26, 2017 14:00 — forked from kopiro/sslrenewal
SSL Renewal with LE using same CSR
#!/bin/bash
CONTAINER="/var/www/html"
DOMAIN="kopiro.it"
PUBLIC_DIR="$CONTAINER/public"
BACKUP_DIR="$CONTAINER/conf/backup/$(date +%s)"
mkdir -p "$BACKUP_DIR"
cp -v $CONTAINER/conf/*.pem "$BACKUP_DIR/"
@progress44
progress44 / PackageApplication
Last active June 8, 2017 09:13
PackageApplication script from Xcode 8.2.1
#!/usr/bin/perl
#
# PackageApplication
#
# Copyright (c) 2009-2012 Apple Inc. All rights reserved.
#
# Package an iPhone Application into an .ipa wrapper
#
use Pod::Usage;
@progress44
progress44 / install.sh
Created June 8, 2017 07:35
Installs an ipa file to an ios device
#!/bin/sh
# Install an app to device
ideviceinstaller -i dist/xx.ipa
@progress44
progress44 / _service.md
Created March 28, 2017 14:41 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
jsdoc -c jsdoc.conf.json -d [DIR_OF_DOC]