Skip to content

Instantly share code, notes, and snippets.

View warthurton's full-sized avatar

Wayne Arthurton warthurton

View GitHub Profile
@jsit
jsit / Wordle Streak Transfer.txt
Last active February 27, 2022 05:05
Wordle Streak Transfer
https://www.nytimes.com/games/wordle/index.html?data={%22statistics%22:{%22currentStreak%22:32,%22maxStreak%22:32,%22guesses%22:{%221%22:0,%222%22:1,%223%22:5,%224%22:20,%225%22:11,%226%22:6,%22fail%22:1},%22winPercentage%22:98,%22gamesPlayed%22:44,%22gamesWon%22:43,%22averageGuesses%22:4}}
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
@ttscoff
ttscoff / sizes.rb
Last active July 12, 2021 03:33
sizes: Calculate and sort all filesizes for current folder
#!/usr/bin/env ruby
# Sizes - Calculate and sort all filesizes for current folder Includes
# directory sizes, colorized output Brett Terpstra 2019 WTF License
VERSION = "1.0.1"
require 'shellwords'
# Just including term-ansicolor by @flori and avoiding all the
# rigamarole of requiring multiple files when it's not a gem... - Brett
#

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@Beej126
Beej126 / README.md
Last active April 18, 2022 15:41
Scripted Windows 10 "Win+X" Menu (aka "Power User Menu")
@jchandra74
jchandra74 / PowerShell Customization.md
Last active March 1, 2024 01:02
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@ttscoff
ttscoff / TECensor.js
Last active May 4, 2016 13:56
A &#%$ing JavaScript snippet for TextExpander to automatically censor naughtiness with !%@#. #!@& that's cool.
// modify/duplicate the other snippets in this group, using
// the abbreviation to define words to replace with "swear" characters
function censor (input) {
var badWord = input.replace(/((er)?s?|ing)?$/, '');
return input.replace(badWord, censored(badWord));
}
function shuffleArray(inputArr) {
var array = inputArr.slice(0);
unset __messy_path
unset __cleaned_path
unset __path_check
declare -A __path_check
__messy_path+=(/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin /Applications/VMware\ Fusion.app/Contents/Library /Applications/Postgres.app/Contents/Versions/{9.3,9.4}/bin /{usr,opt}/{local,X11}/{bin,sbin} $HOME/bin)
__messy_path+=($(IFS=:; echo $PATH))
__messy_path+=(/{usr,opt}/{bin,sbin} /{bin,sbin})