Skip to content

Instantly share code, notes, and snippets.

View sanjayankur31's full-sized avatar

Ankur Sinha sanjayankur31

View GitHub Profile
@matthewbednarski
matthewbednarski / mimeapps.list
Created March 11, 2015 10:44
Instruct xdg to use mutt as default email application. Both files go in ~/.local/share/applications
[Default Applications]
x-scheme-handler/mailto=mutt.desktop;
diff --git a/fpaste b/fpaste
index 7a2eefe..d33461a 100755
--- a/fpaste
+++ b/fpaste
@@ -20,7 +20,7 @@ VERSION = '0.3.8.1'
USER_AGENT = 'fpaste/' + VERSION
SET_DESCRIPTION_IF_EMPTY = 1 # stdin, clipboard, sysinfo
# FPASTE_URL = 'http://fpaste.org/'
-FPASTE_URL = 'http://paste.fedoraproject.org/'
+FPASTE_URL = 'http://modernpaste.fedorainfracloud.org/api/paste'
@sanjayankur31
sanjayankur31 / sqldeveloper-fedora25.rst
Last active November 16, 2016 23:24
Using SQL Developer off campus on Fedora 25 Linux

VPN access

In a terminal:

sudo openconnect --juniper uhvpn.herts.ac.uk

It'll ask for credentials. Staff will use: <your studynet id>@staff while students will use: <your studynet id>@student

@narate
narate / create-hotspot.md
Last active April 15, 2024 14:22
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@nagapavan
nagapavan / npm-freeze.sh
Created April 25, 2018 09:33
npm hacks
function npm-freeze() {
# npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk -v quote='"' 'BEGIN { FS = "@" } ; { print quote $1 quote,":",quote $2 quote"," }' | sed -e 's/ :/:/g'
entries=`npm list --depth=0 -prod true "$@" 2>/dev/null | grep -v "UNMET PEER DEPENDENCY\|peer dep missing" | grep -E "^(├|└)─" | cut -d" " -f2`
echo '"dependencies" : {'
for entry in ${entries}; do
if [[ $entry =~ ^@.* ]]; then
# echo $entry
echo $entry | awk -v quote='"' -v attherate='@' 'BEGIN { FS = "@" }; { print quote attherate $1$2 quote,":",quote $3 quote"," }'
else