Skip to content

Instantly share code, notes, and snippets.

View austinarchibald's full-sized avatar

Austin Archibald austinarchibald

View GitHub Profile
@robince
robince / set_folder_date_modified.py
Created February 22, 2022 21:22
Fix loss of folder "date modified" on mac (e.g. from iCloud): cd ~/Documents; set_folder_date_modified.py ./
#!/usr/bin/env python
import os
import sys
import time
from datetime import datetime
def set_folder_dates(root):
for x in os.walk(root, topdown=False):
@joyrider3774
joyrider3774 / QuitActiveWindow.ahk
Created October 7, 2021 02:32
XBox Controller autohotkey script to close or activate the active window (handy with games)
#SingleInstance Ignore
while (true)
{
;back + start -> quit active window
if ((getKeyState("joy7") && getKeyState("Joy8")) || (getKeyState("2joy7") && getKeyState("2Joy8")) || (getKeyState("3joy7") && getKeyState("3Joy8")))
{
WinClose A
sleep 900
}
;back + right stick click -> send esc
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active May 6, 2024 21:19
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@jeremywrowe
jeremywrowe / gist:3506869
Created August 29, 2012 04:33
highcharts - show label for first and last data points in a series
plotOptions: {
line : {
dataLabels : {
enabled : true,
formatter: function() {
var first = this.series.data[0],
last = this.series.data[this.series.data.length - 1];
if ((this.point.category === first.category && this.point.y === first.y) ||
(this.point.category === last.category && this.point.y === last.y)) {
return this.point.y;