Skip to content

Instantly share code, notes, and snippets.

View navhaxs's full-sized avatar

Jeremy Wong navhaxs

View GitHub Profile
@chenxiaolong
chenxiaolong / DellXPS15_9560_AHCI_RAID.md
Created November 27, 2017 01:33
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
@dingzeyuli
dingzeyuli / copy
Created November 11, 2016 15:33
Faster and more efficient alternative to scp for file copying
#!/bin/sh
# whenever you use "scp", use "copy" instead, it ignores duplicate files.
rsync -azhe ssh --progress $1 $2
@jessedearing
jessedearing / 0-README.md
Last active November 14, 2023 15:02
@sadserver's tweets in fortune file format

Description

This is all of @sadserver's tweets packaged in a file ready to be converted into a .dat file for the fortune program.

Installing

  1. Install fortune if your distro doesn't already have it.
  2. Convert this into a fortune file run strfile -c % sadserver_tweets sadserver_tweets.dat
  3. Copy the files into your fortune directory cp sadserver_tweets sadserver_tweets.dat /usr/local/share/games/fortunes. Note that I'm on OS X so the file path reflects that. Linux is going to be something like /usr/share/games/fortunes.
  4. Add a line to your shell's profile/rc file. I.e. fortune sadserver_tweets
  5. Laugh/cry when you log into your desktop/servers.
@oleq
oleq / _README.md
Last active September 7, 2024 13:11
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@squarism
squarism / iterm2.md
Last active April 17, 2025 20:55
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@ninadpchaudhari
ninadpchaudhari / 98-mylog
Last active March 28, 2024 19:18 — forked from navhaxs/99-keepwanalive
openwrt wan auto reconnect hotplug script
#!/bin/sh
#File for my debugging purposes
echo $ACTION >> /tmp/mylog
echo $INTERFACE >> /tmp/mylog
echo "" >> /tmp/mylog
@blt
blt / hello.erl
Last active December 4, 2020 05:41
What should be the standard Erlang "Hello, world!"
-module(hello).
-export([hello/1]).
hello(robert) ->
io:format("Hello, Mike.");
hello(joe) ->
io:format("Hello, Robert.");
hello(mike) ->
io:format("Hello, Joe.").
@protrolium
protrolium / ffmpeg.md
Last active April 8, 2025 01:38
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: