Skip to content

Instantly share code, notes, and snippets.

View thomasmalley's full-sized avatar

thomasmalley

  • Düsseldorf, Germany
  • 19:51 (UTC +02:00)
View GitHub Profile
@dsci
dsci / gist:1347672
Created November 8, 2011 12:52
Delete commits from repository.
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@andphe
andphe / gist:3232343
Created August 2, 2012 01:41
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'
@jesseschalken
jesseschalken / code_style.md
Last active April 24, 2024 17:27
Code style

My preferred code style is 2-space K&R. This is intended to provide a justification for this style.

Why K&R?

K&R style has the following properties:

  1. Provides symmetric size (in terms of screen space consumed) between the opening and closing syntax of a clode block.
  2. Forces no empty or meaningless lines, thereby avoiding artificial distance between related things that should be together.
  3. Consumes the minimum vertical space while keeping the opening and closing syntax of a block on separate lines from the content.
@lornajane
lornajane / mac.md
Last active April 21, 2024 15:04
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@rveitch
rveitch / sync_acf_post_title.php
Last active December 7, 2022 21:40
Update WordPress post title from an ACF field value on save. (Advanced Custom Fields)
<?php
/**
* Update Post Title from an ACF field value on post save.
*
* Triggers on save, edit or update of published posts.
* Works in "Quick Edit", but not bulk edit.
*/
function sync_acf_post_title($post_id, $post, $update) {
$acf_title = get_field('my_acf_field_name', $post_id); // NOTE: enter the name of the ACF field here
@FaHuSchmidt
FaHuSchmidt / readme.md
Last active August 1, 2022 07:02
1&1 Webhosting SSH-Zugang

SSH-Verbindung mit Benutzername und Passwort aufbauen

ssh [user]@[host]

Passwort bei Aufforderung eingeben

SSH-Ordner im Benutzerverzeichnis anlegen

@lukecav
lukecav / functions.php
Created January 10, 2018 03:22
Disable Elementor overview dashboard widget in WordPress
function disable_elementor_dashboard_overview_widget() {
remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'disable_elementor_dashboard_overview_widget', 40);
@ebetancourt
ebetancourt / wp-disable-plugin-update.php
Last active March 29, 2024 13:03 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
<?php
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {