Skip to content

Instantly share code, notes, and snippets.

View lukejones's full-sized avatar

Luke Jones lukejones

View GitHub Profile
@lukejones
lukejones / fix-logitech-bluetooth-lag.md
Created July 5, 2023 16:21
Fix Logitech MX Master / Keys 3S Bluetooth Lag on MacOS

For those who get issues with input lag on their bluetooth devices, do the following to remove the lag.

  1. Open up Terminal.app (Applications > Utilities > Terminal)
  2. Run the command sudo pkill bluetoothd (just copy and paste that into Terminal).
  3. Hit Return/Enter.
  4. Enter your macOS user password (the one you sign in to your Mac with).
  5. Hit Return/Enter.
  6. Wait for a few moments while the Bluetooth receiver resets and all the devices restart.
@lukejones
lukejones / main.css
Created April 6, 2017 13:29
Shadows
* {
box-shadow: 0 10px 10px rgba(0,0,0,0.25);
}
@lukejones
lukejones / post.md
Last active September 19, 2016 21:08
Original post

When Writing Gets Hard


View revisions to this post on GitHub


Writing is an escape. I get an idea and start writing, forcing myself to carry on I have to stop. The moment I think too much about what I’m doing, I panic and overthink the sentences, structure, ideas, and end up scrapping everything I’ve done.

@lukejones
lukejones / browserheight
Created July 29, 2013 09:49
Detect browser height
function browserHeight(){
var headerHeight = $(window).height();
$(".header").css('height',headerHeight); // I wanted to subtract pixels from this value, e.g. change 970px to 920px
};
$(document).ready(browserHeight);
@lukejones
lukejones / regex
Created December 20, 2012 16:14
shoddy regex
([a-z\&\-A-Z0-9\s])
@lukejones
lukejones / gist:4344856
Created December 20, 2012 11:47
htaccess domain www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^lukejones.me$ [NC]
RewriteRule ^(.*)$ http://www.lukejones.me/$1 [L,R=301]
@lukejones
lukejones / nakedtwitter.css
Created October 9, 2012 08:08
Naked twitter
.content-main {
float: none;
width: 100%;
}
.dashboard {
display: none;
}
.nav > ul > li > a {
@lukejones
lukejones / wp-config.php
Created September 24, 2012 09:02
Multiple development environments within wp-config
<?
// Database settings
switch($_SERVER['SERVER_NAME']) {
// Local Environment
case 'localhost':
define('DB_NAME', 'db_name');
define('DB_USER', 'db_user');
define('DB_PASSWORD', 'db_password');
define('DB_HOST', 'localhost');
@lukejones
lukejones / redirect.js
Created February 22, 2012 13:01
Redirecting page based on URL
window.onload = function() {
window.location.replace("<?php echo($productUrl); ?>");
}
@lukejones
lukejones / CSS
Created February 10, 2012 10:47
Expanding / collapsing navigation
ul {
margin:0.5em 0;
padding:0 0 0 1em;
}
ul ul {
margin: 0;
}
a.active, li.active a {