Skip to content

Instantly share code, notes, and snippets.

View wgallios's full-sized avatar

William Gallios wgallios

View GitHub Profile
@wgallios
wgallios / git-merge-strategies
Created March 7, 2023 22:09 — forked from troyericg/git-merge-strategies
(Because I always forget) How to overwrite a master branch with a remote branch
git checkout better_branch
git merge --strategy=ours master # keep the content of this branch, but record a merge
git checkout master
git merge better_branch # fast-forward master up to the merge
----------------------
If you want your history to be a little clearer, I'd recommend adding some information to the merge commit message to make it clear what you've done. Change the second line to:
@wgallios
wgallios / arch-linux-install
Last active April 12, 2023 20:44 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@wgallios
wgallios / interfaces
Last active August 29, 2015 14:12
Basic Wifi /etc/network/interfaces for Raspberry Pi B+ Kernel v. 3.12
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "SSID"
wpa-psk "wpa_password"
@wgallios
wgallios / show-applications.dockitem
Created November 23, 2014 07:32
Plank Menu Item launcher
[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/application.desktop
@wgallios
wgallios / show-applications.desktop
Created November 23, 2014 07:30
Gnome 3 "Show Applications" desktop launcher. /usr/share/applications/name.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Show Applications
Comment=Show applications menu
Exec=gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.overview.toggle();Main.overview.viewSelector._showAppsButton.checked = true;';
Icon=view-grid-symbolic
Path=
Terminal=false
@wgallios
wgallios / GPL.md
Last active August 29, 2015 14:10 — forked from jnrbsn/GPL.md

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

@wgallios
wgallios / .muttrc
Created November 11, 2014 06:42
Example Muttrc File
set imap_user = "username@gmail.com"
set imap_pass = ""
set smtp_url = "smtp://username@smtp.gmail.com:587"
set smtp_pass = ""
set from = "username@gmail.com"
set realname = "FirstName LastName"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
#!/bin/bash
set -e
if [ ! -z "$1" ]; then
KERNEL="$1"
else
KERNEL="$(uname -r)"
fi
@wgallios
wgallios / grub.conf
Last active August 29, 2015 14:08
grub.conf for grub legacy bootloader used to boot Ubuntu 14.10 64-bit on Acer Switch 10
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
color green/black white/gray
#hiddenmenu
title Ubuntu 14.10 x64
root (hd0,0)
kernel /casper/vmlinuz.efi ro root=/dev/sda1 file=/cdrom/preseed/ubuntu.seed boot=casper rhgb quiet splash --
initrd /casper/initrd.lz
@wgallios
wgallios / selectOnClick
Created September 15, 2014 06:24
AngularJS Directive to select all on-click for an input
app.directive('selectOnClick', function () {
return {
restrict: 'A',
link: function (scope, element, attrs) {
element.on('click', function () {
this.select();
});
}
};
});