Skip to content

Instantly share code, notes, and snippets.

View woffleloffle's full-sized avatar

Willem Labuschagne woffleloffle

View GitHub Profile
save = !sh -c 'export PREV=$(git symbolic-ref HEAD|cut -d/ -f3-) && git checkout -b "$1" && git commit -am "$1" && git checkout "$PREV"' -
@sam016
sam016 / AllGattCharacteristics.java
Last active July 5, 2024 15:52
Bluetooth GATT Services & Characteristics
package com.sam016.vsflatomation.service.ble;
import java.util.HashMap;
import java.util.UUID;
public class AllGattCharacteristics {
private static HashMap<String, String> attributes = new HashMap();
static {
attributes.put("00002a00-0000-1000-8000-00805f9b34fb", "Device Name");
@woffleloffle
woffleloffle / flushdns
Created February 22, 2018 17:51
Your RC file alias to clear your DNS Cache
# Flush DNS Cache
alias flushdns="sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder && echo 'DNS Cache cleared!'"
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@woffleloffle
woffleloffle / README.md
Created January 27, 2016 09:12
Squash git commits together.

git squash alias

From here.

Run git config --global --edit and add the following under the [alias] section.

squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"
@parmentf
parmentf / GitCommitEmoji.md
Last active July 25, 2024 13:30
Git Commit message Emoji
@gunjanpatel
gunjanpatel / amazon-ec2-ftp.md
Last active October 10, 2023 15:31
amazon ec2 LAMP and FTP installation and setup
@asugai
asugai / gist:8408561d5134cf090f78
Last active February 24, 2021 20:10
enable gzip / compression on an Amazon AMI EC2 instance via .htaccess
# Mixings from:
# https://www.clayharmon.com/words/posts/enabling-gzip-compression-on-ec2
# http://www.samaxes.com/2008/04/htaccess-gzip-and-cache-your-site-for-faster-loading-and-bandwidth-saving/
# http://www.tonmoygoswami.com/2013/05/how-to-enable-gzip-on-amazon-elastic.html
# ------------------------------------------------------------------------------
# | Compression |
# ------------------------------------------------------------------------------
<IfModule mod_deflate.c>
@woffleloffle
woffleloffle / remove_node_modules.bat
Created October 13, 2014 21:49
Delete pesky `node_modules` folders that are too long in one fell sweep.
mkdir em && robocopy em node_modules /MIR
rmdir em && rmdir node_modules
@woffleloffle
woffleloffle / JS Object Merge
Last active August 29, 2015 14:06
Merging two JS Objects into one
/**
* Merge two JS Objects
*
* returns a new Object with values of
* first and second added to each other.
*
* Note:
* Object items should only have integers for values
* ..otherwise, boom!
*/