This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change window focus within space | |
alt - j : yabai -m window --focus south | |
alt - k : yabai -m window --focus north | |
alt - h : yabai -m window --focus west | |
alt - l : yabai -m window --focus east | |
#change focus between external displays (left and right) | |
alt - s: yabai -m display --focus west | |
alt - g: yabai -m display --focus east |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TMUX | |
C-a C-o Rotate through the panes | |
C-a C-z Suspend the current client | |
C-a Space Select next layout | |
C-a ! Break pane to a new window | |
C-a # List all paste buffers | |
C-a $ Rename current session | |
C-a & Kill current window | |
C-a ' Prompt for window index to select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useCallback, useEffect } from 'react'; | |
export default function App() { | |
// handle what happens on key press | |
const handleKeyPress = useCallback((event) => { | |
console.log(`Key pressed: ${event.key}`); | |
}, []); | |
useEffect(() => { | |
// attach the event listener |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const isTouchDevice = () => { | |
let prefixes = ' -webkit- -moz- -o- -ms- '.split(' ') | |
let mq = function(query) { | |
return window.matchMedia(query).matches | |
} | |
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) { | |
return true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.renderWhitespace": "all", | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.formatOnPaste": true, | |
"editor.cursorStyle": "line-thin", | |
"workbench.iconTheme": "file-icons-colourless", | |
"editor.fontFamily": "BlexMono Nerd Font Mono", | |
"editor.fontLigatures": true, | |
"editor.renderControlCharacters": true, | |
"editor.fontWeight": "400", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X-Frame-Options: DENY | |
Cache-Control: max-age=31557600 | |
add_header 'Access-Control-Allow-Origin' '*' always; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, PATCH, OPTIONS' always; | |
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always; | |
add_header 'Access-Control-Max-Age' 31536000 always; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isMobile = { | |
Android: function() { | |
return navigator.userAgent.match(/Android/i); | |
}, | |
BlackBerry: function() { | |
return navigator.userAgent.match(/BlackBerry/i); | |
}, | |
iOS: function() { | |
return navigator.userAgent.match(/iPhone|iPad|iPod/i); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"prefix": "require", | |
"body": [ | |
"$1: require('../$1/$1.data')" | |
], | |
"description": "Require data" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// aspect ratio | |
@mixin ratio($width:16, $height:9) { | |
width: 100%; | |
overflow: hidden; | |
padding-top: ($height / $width) * 100%; | |
position: relative; | |
> * { | |
position: absolute; | |
width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.renderWhitespace": "all", | |
"eslint.autoFixOnSave": true, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.formatOnPaste": true, | |
"workbench.colorCustomizations": { | |
"tab.activeBorder": "#00E5E5", | |
"list.inactiveSelectionForeground": "#00E5E5", | |
"list.activeSelectionBackground": "#00a6a9" | |
}, |