Skip to content

Instantly share code, notes, and snippets.

View neggles's full-sized avatar
🐈
cat stuff, mostly

Andi Powers-Holmes neggles

🐈
cat stuff, mostly
View GitHub Profile
@mkottman
mkottman / twoline_prompt.sh
Last active July 19, 2023 06:53
A two-line colored Bash prompt (PS1) with Git branch and a line decoration which adjusts automatically to the width of the terminal. Recognizes SVN, Git and Fossil version control systems and shows the current branch/revision.
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Recognizes and shows Git, SVN and Fossil branch/revision.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
@sunnyone
sunnyone / PowerShellUICulture.ps1
Created November 15, 2013 15:48
Changing PowerShell UICulture
# example: Set-PowerShellUICulture -Name "en-US"
function Set-PowerShellUICulture {
param([Parameter(Mandatory=$true)]
[string]$Name)
process {
$culture = [System.Globalization.CultureInfo]::CreateSpecificCulture($Name)
$assembly = [System.Reflection.Assembly]::Load("System.Management.Automation")
@JosefJezek
JosefJezek / zenoss_json_api.sh
Last active February 26, 2018 01:23 — forked from cluther/zenoss-shell-functions
Zenoss JSON API Shell / Bash script
#!/bin/sh
# Zenoss JSON API Shell / Bash script
# Link: https://gist.github.com/8399651
# Resources
# http://wiki.zenoss.org/Working_with_the_JSON_API
# https://gist.github.com/cluther/1901884
# http://blog.remibergsma.com/2013/04/26/automatically-adding-and-editing-devices-in-zenoss-core-4-using-the-api
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 22, 2024 22:13
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@thomasfr
thomasfr / autossh.service
Last active May 9, 2024 16:59
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@ScriptingPro
ScriptingPro / powershell-set-terminal-services-profile-path.ps1
Last active September 27, 2021 12:33
PowerShell Set Terminal Services Profile Path
<#
Set Active Directory Users Terminal Services Profile Path Using PowerShell
There is no remote desktop services profile path attribute, because TerminalServicesProfilePath is saved in the Active Directory user object's UserParameters attribute as a binary blob
This snippet will find ADUsers that match $TSProfilePath_OLD and set their remote desktop services profile path to $TSProfilePath_NEW
#>
# Need Active Directory Cmdlets
Import-Module ActiveDirectory
# Change TerminalServicesProfilePath only on users that are currently pointing to:
@stefansundin
stefansundin / openssh-7.3.sh
Last active September 13, 2022 21:03
Install OpenSSH 7.3 in Ubuntu 16.04
# WARNING: Use this at your own risk. It will probably break your other packages and cause other havoc.
# These days you should just upgrade to Ubuntu 18.04.
$ ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
wget https://launchpadlibrarian.net/277739251/openssh-client_7.3p1-1_amd64.deb
wget https://launchpadlibrarian.net/298453050/libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/298453058/libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb
wget https://launchpadlibrarian.net/298453060/libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb
@bohack
bohack / Flashing a 3700i Cisco Wireless Access Point
Created September 5, 2017 13:52
Flashing a 3700i Cisco Wireless Access Point
Hold the reset button for 30 seconds during boot
release and press ESC a few times
format flash:
set ENABLE_BREAK=yes
set IP_ADDR 10.2.7.10
set NETMASK 255.255.0.0
tftp_init
ether_init
flash_init
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@JamesHagerman
JamesHagerman / stslte-notes.md
Last active March 17, 2024 20:37
My notes about running srsLTE

srsLTE notes

These are notes I've taken while rying to get srslte up and running. This is messy, sorry...

Working solution - LimeSDR + SoapySDR + srsLTE

Dependencies:

sudo apt install tree vim git g++ make cmake pkg-config libpython-dev python-numpy swig libi2c-dev libusb-1.0-0-dev libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev gnuradio