Skip to content

Instantly share code, notes, and snippets.

View artynet's full-sized avatar

Arturo Rinaldi artynet

View GitHub Profile
@artynet
artynet / README.md
Created November 4, 2015 10:21 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@artynet
artynet / uninstall-macports.sh
Created November 6, 2015 10:54
Simple script to uninstall MacPorts from your OSX system
#!/bin/bash
sudo rm -rvf \
/opt/local \
/Applications/DarwinPorts \
/Applications/MacPorts \
/Library/LaunchDaemons/org.macports.* \
/Library/Receipts/DarwinPorts*.pkg \
/Library/Receipts/MacPorts*.pkg \
/Library/StartupItems/DarwinPortsStartup \
@artynet
artynet / openssl-openwrt-makefile.makefile
Last active November 7, 2015 15:14
New openssl Makefile with HOSTBUILD for OpenWRt
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
PRINTS MAC ADDRESS OF ETH0
ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'
cat /sys/class/net/eth0/address
cat /sys/class/net/wlan0/address
PRINT LAST FOUR DIGITS OF THE ABOVE MAC ADDRESS
ifconfig eth0 | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | tail -c 6 | sed s/://g
@artynet
artynet / colortest.sh
Created November 12, 2015 23:15
Test the colors of your bash shell !
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
#
# The MIT License (MIT)
#
# Copyright (c) 2015 - Arduino Srl (http://www.arduino.org/) support@arduino.org
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@artynet
artynet / buildnode.sh
Created March 5, 2016 16:44 — forked from adammw/buildnode.sh
Node.js for Raspberry Pi Packaging Script
#!/bin/sh
## Node.js for Raspberry Pi Packaging Script
## =========================================
## Execute this script from within node.js git repo
## Use like this:
## ~/node/$ VERSION=v0.10.0 ./buildnode.sh
if [ -z $VERSION ]; then
echo "set the VERSION first"
exit 1
#!/bin/bash
## Node.js for Raspberry Pi 2 Packaging Script
## =========================================
## Use like this:
## ./buildnode.sh <node_tarball_version>
clean () {
rm -rvf node-v$1/
}
#!/bin/bash
## Node.js for Raspberry Pi 1 Packaging Script
## =========================================
## Use like this:
## ./buildnode.sh <node_tarball_version>
clean () {
rm -rvf node-v$1/
}
@artynet
artynet / sign-openwrt-packages
Created March 17, 2016 17:29 — forked from hongkongkiwi/sign-openwrt-packages
Little script to sign OpenWRT packages after running a build. I used this because I couldn't figure out how to do it automatically when using the SDK.
#!/bin/bash
#
# AUTHOR: Andy Savage <andy@savage.hk>
# GITHUB: https://gist.github.com/hongkongkiwi/cfef6910c5c644eaebc9
# PURPOSE: After building one or more packages in OpenWRT this script signs them with a key file
# this can then be easily used in opkg to verify signatures.
#
KEY_DIR="$HOME/signify-keys"