Skip to content

Instantly share code, notes, and snippets.

View dragon788's full-sized avatar

dragon788 dragon788

View GitHub Profile
@dragon788
dragon788 / gitconfig-git
Created September 24, 2015 19:50 — forked from stevenh512/gitconfig-git
URL rewriting in .gitconfig
# Use git and git+ssh instead of https
[url "git://github.com/"]
insteadOf = https://github.com/
[url "git@github.com:"]
pushInsteadOf = "git://github.com/"
[url "git@github.com:"]
pushInsteadOf = "https://github.com/"
@dragon788
dragon788 / README.md
Last active March 24, 2024 07:57 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@dragon788
dragon788 / DW5800GPS.md
Created October 18, 2015 19:38 — forked from kaizhao86/DW5800GPS.md
Enabling Dell Wireless 5800 (DW5800) Novatel E362 Verizon 4G PCI-E card's GPS

Use the following Hayes AT command through the diag com port:

AT$NWGPSSTART=3,1,4,250,50,255

@dragon788
dragon788 / gist:30288b47bf72bb1712ca
Last active October 18, 2015 21:43
Getting the DW5800 aka Novatel E362 card working on Windows 7/8/10
# Taken from the evdoforums from evdoinfo
# Putting it here to be able to find it again later
# http://www.evdoforums.com/post-88672.html#88672
This is how you make it work:
- download and try run the driver package DELL_DW5800-LTE-4G-MOBILE-BR_A00_R303097.exe
- first it will extract, then the installer will run and give you a warning message that "This is not a Dell compatible system" or something similar
- just before the warning message, you will see that the installer is extracting an .msi file called "Dell Wireless Mobile Broadband dw5800 4G Drivers.msi" (you can repeat the install until you get the right name of the .msi file)
- without closing the"This is not a Dell compatible system" warning message, search for the .msi file and copy it to a different known location
- you can now close the "This is not a Dell compatible system" warning window
@dragon788
dragon788 / CapsLockCtrlEscape.ahk
Created December 12, 2015 18:25 — forked from sedm0784/CapsLockCtrlEscape.ahk
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own, and Ctrl when used in combination with another key, à la Steve Losh. Adapted from the one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281).
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}
@dragon788
dragon788 / .bash_aliases.vagrant
Last active May 19, 2016 00:19
Vagrant check ports
# This works in Git Bash and Babun/Cygwin ZSH
# This could be created as more OS agnostic, currently it is hardcoded for VMware's Windows network config path
# This shows the entire vmnetnat config file for sanity checking
alias vmnetnat='cat C:/ProgramData/VMware/vmnetnat.conf'
# This shows all the ports that Vagrant has added to the VMware config
alias vagrantports='grep -A1000 "# VAGRANT-BEGIN" C:/ProgramData/VMware/vmnetnat.conf | grep -B1000 "# VAGRANT-END" | grep -v -G "VAGRANT"'
# This should only be used when VMware is closed, this deletes all the extra VMs that show up if you destroy/up a lot
alias vagrantpurge="rm C:/Users/$USER/AppData/Roaming/VMware/inventory.vmls"
@dragon788
dragon788 / gitHttpWorkaround.sh
Created January 8, 2016 03:34
Git port blocked proxy workaround
#Global if you never have direct access to github
git config --global url.https://github.com/.insteadOf git://github.com/
#Repository specific if you only have certain repos you need to push/pull via git:// behind the proxy
git config url.https://github.com/.insteadOf git://github.com/
@dragon788
dragon788 / vm-resize-hard-disk.md
Created January 11, 2016 22:12 — forked from christopher-hopper/vm-resize-hard-disk.md
Resize a Hard Disk for a Virtual Machine provisioned using Vagrant from a Linux base box to run using VirutalBox.

Resize a Hard Disk for a Virtual Machine

Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.

Some assumptions

The following steps assume you've got a set-up like mine, where:

@dragon788
dragon788 / gist:eb42335db2886639e099
Created January 27, 2016 01:22 — forked from lamw/gist:bae9687faa14c7d7ee18
Automate silent install of VMware Tools including enabling Automatic Kernel Module Update
#!/bin/bash
# Create temp workign directory
mkdir -p /mnt/vmw-tools
# Mount VMware Tools ISO
mount /dev/cdrom /mnt/vmw-tools
# Retrieve the VMware Tools package name from the directory
VMW_TOOLS=$(ls /mnt/vmw-tools/ | grep .gz)
@dragon788
dragon788 / replace-debian-with-arch.txt
Created January 28, 2016 22:11 — forked from m-ou-se/replace-debian-with-arch.txt
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget http://ftp.nluug.nl/os/Linux/distr/archlinux/iso/2016.01.01/archlinux-bootstrap-2016.01.01-x86_64.tar.gz
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-2016.01.01-x86_64.tar.gz --strip-components=1