Skip to content

Instantly share code, notes, and snippets.

View brosahay's full-sized avatar
🎯
Focusing

Rohan S brosahay

🎯
Focusing
View GitHub Profile
ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR
@brosahay
brosahay / nokia-router-cfg-tool.py
Created January 19, 2023 20:58 — forked from thedroidgeek/nokia-router-cfg-tool.py
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
@brosahay
brosahay / README.md
Created September 29, 2022 03:23 — forked from Sieboldianus/README.md
An opinionated nextcloud ignore list for developers (sync-exclude.lst)

An opinionated nextcloud ignore list for developers (sync-exclude.lst)

The latest nextcloud server versions will have ransomware detection automatically enabled, meaning that syncing common developer file types (e.g. .lock) will return errors.

Fatal webdav OCA\DAV\Connector\Sabre\Exception\Forbidden: Ransomware file detected. Prevented upload of ..py/bokeh/secrets.tar.enc because it matches extension pattern ".enc"

If you are syncing complex, nested work directories as a developer, the following

@brosahay
brosahay / scapy_network_traffic_replay.py
Created August 11, 2022 21:10
Small helper scritpt to replay Scapy traffic
#!/usr/bin/env python
from scapy.arch import get_if_hwaddr, get_if_addr, get_if_addr6
from scapy.config import conf
from scapy.layers.inet import IP
from scapy.layers.inet6 import IPv6
from scapy.layers.l2 import Ether
from scapy.sendrecv import sendp, send
from scapy.utils import rdpcap
@brosahay
brosahay / install-python-3.9.12.sh
Last active May 20, 2022 11:02
Python 3.9 on Ubuntu 22.04 LTS
#!/bin/sh
## Helper file for supporting Ubuntu 22.04LTS for MATTER(formerly CHIP) development
# Install build dependencies
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
# Download and extract source
cd /tmp/
@brosahay
brosahay / chroot-to-pi.sh
Created May 2, 2022 08:17 — forked from htruong/chroot-to-pi.sh
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@brosahay
brosahay / 24OnlineCLI.md
Created March 24, 2022 09:34
24Online Command Line Client

login using cURL

##############################################################################
#define variables
tput clear
srv_ip=""
username=""
password=""
 
connected=0
@brosahay
brosahay / Data+PrettyPrint.swift
Created February 9, 2022 20:15 — forked from cprovatas/Data+PrettyPrint.swift
Pretty print JSON string from Data in Swift 4.1 (especially useful printing to Xcode console)
import Foundation
extension Data {
var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription
guard let object = try? JSONSerialization.jsonObject(with: self, options: []),
let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]),
let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil }
return prettyPrintedString
}
#!/bin/sh
################################################################
# Individual channel setting per distinct AP
case `uci get system.@system[0].hostname` in
"ap1")
CHANNELS="36 1"
;;
"ap2")
@brosahay
brosahay / gist-backup.py
Created May 14, 2021 20:28
Clone all my gists automatically (gist backup?)
#!/usr/bin/env python
# Git clone all my gists
import json
import urllib
from subprocess import call
from urllib import urlopen
import os
USER = os.environ['USER']