Skip to content

Instantly share code, notes, and snippets.

@Aneureka
Aneureka / sync-from-chrome-to-safari
Last active July 2, 2025 12:10
An apple script to sync history, bookmarks & passwords from google chrome to safari.
# Add a scheduled sync task at 4:00 am
# Some privileges should be granted to `cron` *manually*, so you may test `* * * * *` (run every second) first to grant the needed privileges in advance
0 4 * * * osascript /path/to/your/sync-from-chrome-to-safari.scpt
@gneek
gneek / PhotoImport.scpt
Created April 28, 2020 02:35
Photo Importer for Apple Photos
tell application "Finder"
with timeout of 36000 seconds
set source_folder to choose folder with prompt "Select source folder."
set destination_folder to choose folder with prompt "Select folder to move imported images to"
my moveToPhotos(source_folder, destination_folder)
end timeout
end tell
on moveToPhotos(sFolder, dFolder)
set albumName to "2020"
#!/bin/bash
# Install apps, packages, etc.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
brew tap homebrew/cask-versions
# brew cask install iterm2
brew install --cask iterm2
@JiveDig
JiveDig / functions.php
Created August 8, 2019 19:14
Automatically add facet label as a heading before any facets with available options to filter by.
<?php
/**
* Adds facet label as a heading before any facets with available options.
*
* @author Mike Hemberger @JiveDig.
*
* @param string $output The facet HTML.
* @param array $params The shortcode/function parameters.
*
@NoahCardoza
NoahCardoza / getOpenTabs.sh
Last active March 4, 2025 22:33
[OSX] Lists the URLs of all the open tabs in a specified browser.
#!/bin/bash
# args: browser
# example: ./getOpenTabs.sh "Brave Browser"
# credits:
# https://gist.github.com/samyk/65c12468686707b388ec43710430a421
# TODO:
# validate args
# don't open app if not already open
@rampfox
rampfox / Chromium-at-startup.md
Last active May 29, 2025 14:05
How to open Chromium in full screen at startup on the Raspberry Pi

(debian 10 buster)

First, it seems that ~/.config/lxsession/LXDE-pi/autostart does not exist by default.

  1. copy the autostart
cp /etc/xdg/lxsession/LXDE-pi/autostart ~/.config/lxsession/LXDE-pi/
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active August 4, 2025 13:45
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@felipeelia
felipeelia / add_rand_orderby_restapi_post.php
Created March 29, 2019 12:14
Randomize the content list in REST API passing `orderby=rand` as parameter.
<?php
/**
* Plugin Name: REST API - Post list randomize
* Description: Randomize the content list in REST API passing `orderby=rand` as parameter.
* Version: 1.0.0
* Author: Felipe Elia | Codeable
* Author URI: https://codeable.io/developers/felipe-elia?ref=qGTOJ
*/
/**
@menushka
menushka / airdropSorter.scpt
Created December 30, 2018 22:47
A Folder Action script written in AppleScript used to separate AirDropped files into a different folder other than the default Downloads folder
property AIRDROP_FOLDER : "Path:to:AirDrop:Folder:in:Alias:format"
property QUARANTINE_KEY : "59"
property GET_QUARANTINE_COMMAND_START : "ls -l -@ '"
property GET_QUARANTINE_COMMAND_END : "' | tr '\\n' ' ' | sed 's/.*com\\.apple\\.quarantine\\s*\\(\\d*\\)/ \\1/' | awk '{$1=$1};1'"
on adding folder items to this_folder after receiving added_items
repeat with i from 1 to length of added_items
set current_item to item i of added_items
set quarantine_type to getQuarantineType(POSIX path of current_item)
@nanoanno
nanoanno / twenty-nineteen-custom-color-override
Last active April 17, 2019 08:28
Twenty-Nineteen Custom Color Override
/*
* Set background for:
* - featured image :before
* - featured image :before
* - post thumbmail :before
* - post thumbmail :before
* - Submenu
* - Sticky Post
* - buttons
* - WP Block Button