Skip to content

Instantly share code, notes, and snippets.

View jeffmcneill's full-sized avatar

Jeff McNeill jeffmcneill

View GitHub Profile
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active May 10, 2024 15:01
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active April 21, 2024 03:30
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 11, 2024 04:45
A better markdown cheatsheet.
@jnovack
jnovack / README.md
Last active April 3, 2024 03:24
Opening up mosh in firewalld using firewall-cmd

Mosh (mobile shell) is a gift from the Gods(tm). Anyone with spotty internet or wireless connection has suffered the pain of a lost SSH session. Sure, one can fire up screen (or tmux as the kids are using these days), but that's an extra step and you are still using the SSH protocol.

I'm not here to tout the benefits of Mosh, you came here to open it up in your firewall.

  1. Create the following file as /etc/firewalld/services/mosh.xml
  2. firewall-cmd --add-service=mosh --permanent
  3. firewall-cmd --reload

If you tend to have a lot of sessions (not recommended), you can increase the ports, but the default should be fine for most applications.

@sergejmueller
sergejmueller / .htaccess
Last active January 12, 2024 20:58
Apache: Detecting WebP support with Header Vary Accept
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1]
</IfModule>
<IfModule mod_headers.c>
Header append Vary Accept env=REDIRECT_accept
</IfModule>
@hakerdefo
hakerdefo / sources.list
Last active October 12, 2023 09:08
Debian Testing complete sources.list
deb https://ftp.debian.org/debian/ testing contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ testing contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ testing-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ testing-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ testing-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ testing-proposed-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ testing-backports contrib main non-free non-free-firmware
@audreyt
audreyt / posa.mkdn
Last active October 12, 2021 01:06
EtherCalc Chapter for the upcoming book "The Performance of Open Source Applications" - Draft - comments welcome!

From SocialCalc to EtherCalc

Previously, in The Architecture of Open Source Applications, I described SocialCalc, an in-browser spreadsheet system that replaced the server-centric WikiCalc architecture. SocialCalc performs all of its computations in the browser; it uses the server only for loading and saving spreadsheets.

For the Socialtext team, performance was the primary goal behind SocialCalc's design in 2006. The key observation was this: Client-side computation in JavaScript, while an order of magnitude slower than server-side computation in Perl, was still much faster than the network latency incurred during AJAX roundtrips:


WikiCalc and SocialCalc's performance model

******
@lifeisfoo
lifeisfoo / dokuwiki ubuntu 16.04
Last active July 10, 2021 14:32
10 steps - a simple guide to setup dokuwiki on nginx and ubuntu 16.04 (even on AWS EC2)
# 1. update apt
apt-get update
# 2. install nginx and php (source https://forum.dokuwiki.org/post/52724;?unb855sess=af28c8160e97b05e634124aa83451119)
apt-get install nginx php php-fpm php7.0-xml
# 3. download dokuwiki
curl https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz -o dokuwiki.tgz
tar xvf dokuwiki.tgz
dokuwiki-2017-02-19e /var/www/dokuwiki
@diogoca
diogoca / update.sh
Created June 13, 2016 15:07
How to install Apache 2.4 and PHP 5.6 on Amazon Linux
# AWS EC2
# Remove Apache and PHP old version
# Install Apache 2.4, Mod_SSL and PHP 5.6
#
sudo service httpd stop
sudo yum erase httpd httpd-tools apr apr-util
sudo yum remove php-*
sudo yum install php56
sudo yum install php56-xml php56-xmlrpc php56-soap php56-gd php56-mbstring
sudo yum install php56-mysqlnd
@prasadnevase
prasadnevase / bacs-account-shortcode.php
Last active July 10, 2020 11:29
WooCommerce - Shortcode to list BACS accounts on checkout page
<?php
/* Usage: Put [bacs_account_details] shortcode in "WooCommerce > Settings > Checkout > BACS > Description field" */
/* This function outputs the BACS account details */
function list_bacs_accounts() {
$accounts = get_option( 'woocommerce_bacs_accounts');
if ( $accounts ) {
$list_accounts = '<table>
<thead>