most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| { | |
| "title": "BRADS Mouse keys based on (full) (rev 4) Uses R_CMD", | |
| "rules": [ | |
| { | |
| "description": "BRADS SHIFT Mouse keys (full) (rev 4) [Available since Karabiner-Elements-11.3.5]", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "right_command", |
| GitHookPushToServer | |
| https://stackoverflow.com/questions/24382150/git-hook-make-server-pull-after-i-push-to-github | |
| cd ~/example && mkdir .git && cd .git && git init --bare | |
| cat > hooks/post-receive << EOF | |
| > #!/bin/sh | |
| > GIT_WORK_TREE=~/example git checkout -f | |
| > EOF | |
| chmod +x hooks/post-receive |
| #!/bin/bash | |
| # IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after. | |
| # WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
| # Get active services: launchctl list | grep -v "\-\t0" | |
| # Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents | |
| # Agents to disable | |
| TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi |
| <canvas id="canvas" style="position:absolute; top:0; left:0;"></canvas> | |
| <div id="buffer" style="display:none;"> |
| <canvas id="canvas" style="position:absolute; top:0; left:0;"></canvas> | |
| <div id="buffer" style="display:none;"> |
| /* Original is 1600px by 1200px */ | |
| /* I want width of 900pxxso */ | |
| /* (90x0/1600)*1200 = 675px */ | |
| /* Surface area of back is then */ | |
| /* 900 * 675 = 607500 */ | |
| /* 607500 / ( 10 * 10) = */ | |
| /* 6075 */ | |
| /* 607500/50 = 12150 */ |
| downloadEmbededVideos(); | |
| /** | |
| * Finds and downloads all embeded Vimeo videos. | |
| */ | |
| function downloadEmbededVideos() { | |
| // Find Vimeo embed frame | |
| var embedFrames = document.querySelectorAll('iframe[src*="player.vimeo.com"]'); | |
| # well not sure how far u wanted that to go.. | |
| # I had to google some quick info/docs. for ex forgot method notation meaning of ! | |
| # Otherwise I think import stuff should be here. Relationships of models (which I am not 100% on but | |
| # I would figure it out from docs if spent more time..), business logic, exceptions and | |
| # transactions.. | |
| # I havent used rails in a while so little rusty but I know I could always get back up to speed | |
| # really quick.. Had to learn React this week for ex.. | |
| # Hope its good enough, left a lot of comments to explain the craziness. Thanks for your time |
| var arr = [4,5,6,7,8,9]; | |
| for (var v of arr) { | |
| console.log( v ); | |
| } | |
| // 4 5 6 7 8 9 | |
| // define iterator that only produces values | |
| // from odd indexes | |
| arr[Symbol.iterator] = function*() { | |
| var idx = 1; | |
| do { |