Skip to content

Instantly share code, notes, and snippets.

View aboulfad's full-sized avatar

Aboulfad aboulfad

  • Montreal
View GitHub Profile
@MohammadAG
MohammadAG / TV_accessory.js
Last active August 17, 2019 19:50
webOS 3 accessory plugin for HAP-NodeJS
var Accessory = require('../').Accessory;
var Service = require('../').Service;
var Characteristic = require('../').Characteristic;
var uuid = require('../').uuid;
var ping = require ("net-ping");
var http = require('http');
var url = require("url");
var util = require("util");
var wsUrl = "ws://IP_ADDRESS_HERE:3000";
@antoniofrighetto
antoniofrighetto / build-xnu.sh
Last active August 6, 2020 12:59
Script to build any XNU kernel version.
# !/bin/bash
# 2k20 ~antoniofrighetto
# Build any XNU kernel version. Make sure you have the related MacOSX SDK version installed
#
# macOS 10.15.4 kernel compilation successfully tested on macOS 10.15.6 and Xcode 11.6
#
# MACOS_VERSION=10.15.4 BACKUP_SDK=1 OPTIONS=RELEASE,DEVELOPMENT ./build-xnu.sh
# XNU_VERSION=xnu-4570.41.2 ./build-xnu.sh
set_macos_version() {
@lexruee
lexruee / bluetooth raspberry-pi
Created January 22, 2015 05:12
install bluetooth and pybluez
sudo apt-get update
sudo apt-get install python-pip python-dev ipython
sudo apt-get install bluetooth libbluetooth-dev
sudo pip install pybluez
# 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=*
@maxtruxa
maxtruxa / Makefile
Last active August 31, 2023 14:56
Generic makefile for C/C++ with automatic dependency generation, support for deep source file hierarchies and custom intermediate directories.
# output binary
BIN := test
# source files
SRCS := \
test.cpp
# files included in the tarball generated by 'make dist' (e.g. add LICENSE file)
DISTFILES := $(BIN)
-- 1. Create a new generic password entry in Keychain Access called "WHATEVER_AnyConnect_VPN" (the name in Keychain access must match that in line 39 below) with your password for the Cisco AnyConnect VPN server.
-- 2. Open this script in Script Editor (both this and the above are in the Applications->Utilities folder) and "Save as.." an Application (.app) with desired name.
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility.
-- 4. Enable the above .app so it can access Accessibility
-- 5. Copy and paste a nice icon on the generic Applescript icon (I used a copy of the default AnyConnect one)
-- 6. Add the new .app to /Users/[yourshortname]/Applications with a shortcut to your Dock
-- 7. Enjoy the fast connection with no need to enter password and increased security of not having a sensitive password stored as plain text
-- 8. Run script again to close connection
-- AnyConnect now refered to as targetApp
@loziju
loziju / macosx-configure-postfix-as-relay.md
Last active January 31, 2024 14:04
Configure postfix as relay for OS X
@hieblmedia
hieblmedia / .gitignore
Last active March 20, 2024 01:22
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@andrewh
andrewh / anyconnect.scpt
Last active April 12, 2024 08:48
Applescript to automate the Cisco AnyConnect SSL VPN client on OS X Mavericks
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor
-- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 4. Enable Applescript Editor and System UI Server
-- 5. Trigger script from the menu
-- 6. Enjoy being connected
tell application "Cisco AnyConnect Secure Mobility Client"
activate
end tell
@soarez
soarez / ca.md
Last active April 22, 2024 03:01
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.