This file contains 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
const detectDeviceType = () => | |
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) | |
? 'Mobile' | |
: 'Desktop'; |
This file contains 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
document.getElementsByTagName("body")[0] | |
.addEventListener("wheel" | |
, event => event.stopPropagation() | |
, true | |
) |
This file contains 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
const IChing64ObjectArray = [ | |
{ 'iChingNum': 1, 'iChingName': "1. Ch'ien / The Creative" }, | |
{ 'iChingNum': 2, 'iChingName': "2. K'un / The Receptive }, Earth" }, | |
{ 'iChingNum': 3, 'iChingName': '3. Chun / Difficulty at the Beginning ' }, | |
{ 'iChingNum': 4, 'iChingName': '4. Mêng / Youthful Folly' }, | |
{ 'iChingNum': 5, 'iChingName': '5. Hsü / Waiting (Nourishment)' }, | |
{ 'iChingNum': 6, 'iChingName': '6. Sung / Conflict' }, | |
{ 'iChingNum': 7, 'iChingName': '7. Shih / The Army' }, | |
{ 'iChingNum': 8, 'iChingName': '8. Pi / Holding Together [union]' }, | |
{ 'iChingNum': 9, 'iChingName': "9. Hsiao Ch'u / The Taming Power of the Small" }, |
This file contains 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
class RubyUtils | |
def invoke_all_tools | |
puts 'use pry, irb, & show-source within pry' | |
end | |
end |
This file contains 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
// ==UserScript== | |
// @name hard scroll | |
// @namespace http://tylsyl.com | |
// @version 0.1 | |
// @description smoothest of scrolls | |
// @author Tyler Sayles | |
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js | |
// @match *://*/* | |
// ==/UserScript== |
This file contains 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 recog = new webkitSpeechRecognition | |
recog.onresult = event => { | |
var last = event.results.length - 1; | |
var what_you_said = event.results[last][0].transcript; | |
alert(what_you_said) | |
} | |
recog.start() |
This file contains 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
setInterval(() => fetch(swApi).then(r => r.json()) | |
.then(ppl => console.log(ppl)) | |
.catch(e => console.log('failed: ', e) | |
) , fiveSec) |
This file contains 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
const isLegalPort = (port) => { | |
if ((typeof port !== 'number' | |
&& typeof port !== 'string') | |
|| (typeof port === 'string' | |
&& port.trim().length === 0)) { | |
return false | |
} | |
return +port === (+port >>> 0) && port <= 0xFFFF | |
} |
This file contains 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
* { | |
box-sizing: border-box; | |
} | |
html { | |
font-family: 'Muli', sans-serif; | |
background: #EAEAEA; | |
color: #333; | |
font-smoothing: antialiased; | |
text-rendering: optimizeLegibility; |
This file contains 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
function imsg --description "send imessage to my myself" | |
osascript -e "tell application \"Messages\" to send \"$argv\" to buddy \"Tyler Sayles\"" | |
end |