Skip to content

Instantly share code, notes, and snippets.

View wgallios's full-sized avatar

William Gallios wgallios

View GitHub Profile
@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 / show-applications.dockitem
Created November 23, 2014 07:32
Plank Menu Item launcher
[PlankItemsDockItemPreferences]
Launcher=file:///usr/share/applications/application.desktop
@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 / 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 / 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 / b2_multipart.php
Created September 18, 2024 18:44 — forked from metadaddy/b2_multipart.php
PHP sample code for a multipart file upload to Backblaze B2. Usage: php php_multipart.php [-v] <bucket_name> <local_file>
<?php
// PHP sample code to show multipart file upload using the B2 Native API
// User supplies optional -v for verbose output from curl, then bucket name
// and path to local file
$rest_index = null;
$opts = getopt("v::", [], $rest_index);
$args = array_slice($argv, $rest_index);