Skip to content

Instantly share code, notes, and snippets.

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@jayluxferro
jayluxferro / GitNPMConfigHttpProxy.md
Last active August 9, 2018 09:15 — forked from evantoli/GitConfigHttpProxy.md
Configure Git/NPM to use a proxy

Configure Git to use a proxy

##In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@jayluxferro
jayluxferro / using-raw-socket-io-in-sails.js
Created August 25, 2018 12:21 — forked from mikermcneil/using-raw-socket-io-in-sails.js
Using raw socket.io functionality in a Sails.js controller
module.exports = {
/**
*
* Using raw socket.io functionality from a Sails.js controller
*
*/
index: function (req,res) {
@jayluxferro
jayluxferro / mbp2011-disable-amd-gpu.md
Last active August 31, 2018 17:31 — forked from blackgate/mbp2011-disable-amd-gpu.md
Macbook Pro 2011 - Disable AMD GPU

1. Change the gpu-power-prefs and disable SIP

Boot into recovery single user mode (press and hold Command + S + R) and run the following commands:

nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00
csrutil disable
reboot
@jayluxferro
jayluxferro / networkmanager-wifi-powersave.md
Created November 9, 2018 11:24 — forked from jcberthon/networkmanager-wifi-powersave.md
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
@jayluxferro
jayluxferro / extract_EAP.sh
Created February 27, 2019 08:02 — forked from singe/create_certs.sh
A simple tshark EAP certificate extractor
#!/bin/sh
# Simple tshark WiFi EAP certificate extractor
# By [email protected]
# All rights reserved 2018
if [ ! -x $(which tshark) ]; then
echo "tshark not installed"
exit 0
fi
@jayluxferro
jayluxferro / derivative.py
Created March 12, 2019 19:05 — forked from astrojuanlu/derivative.py
How to do time derivatives of a pandas Series using NumPy 1.13 gradient
import numpy as np
import pandas as pd
%matplotlib inline
import matplotlib.pyplot as plt
# Base time series
base_t = pd.date_range("2017-07-20 11:00", "2017-07-20 12:00", freq="T")
# We add some random noise to achieve non uniform spacing
@jayluxferro
jayluxferro / manual-uninstall-paragon-ntfs.sh
Created March 12, 2019 22:54 — forked from guycalledseven/manual-uninstall-paragon-ntfs.sh
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@jayluxferro
jayluxferro / ExpandDefenderSig.ps1
Created March 28, 2019 21:21 — forked from mattifestation/ExpandDefenderSig.ps1
Decompresses Windows Defender AV signatures for exploration purposes
filter Expand-DefenderAVSignatureDB {
<#
.SYNOPSIS
Decompresses a Windows Defender AV signature database (.VDM file).
.DESCRIPTION
Expand-DefenderAVSignatureDB extracts a Windows Defender AV signature database (.VDM file). This function was developed by reversing mpengine.dll and with the help of Tavis Ormandy and his LoadLibrary project (https://github.com/taviso/loadlibrary). Note: Currently, "scrambled" databases are not supported although, I have yet to encounter a scrambled database. Thus far, all databases I've encountered are zlib-compressed.
@jayluxferro
jayluxferro / iterm2-solarized.md
Created April 14, 2019 11:28 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k