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
#!/bin/bash | |
# Install basic tools | |
sudo yum -y install git vim zsh zip unzip wget curl | |
# Create basic directories | |
mkdir -p ~/projects ~/tmp ~/.vim/undo | |
# Change default shell to zsh | |
if [[ $SHELL == *"zsh"* ]]; then |
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
const [, user] = location.pathname.split('/'); | |
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
function extract(map, tweets) { | |
const pares = Array.from(tweets).map(($tweet) => { | |
const [$time] = $tweet.getElementsByTagName('time'); | |
if (!$time) return; | |
const date = new Date($time.dateTime); | |
const timestamp = date.toLocaleString().split('/').join('-'); |
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
printf '\e[36m\n This project has\e[35m %s lines\e[36m of source code!\n\n\e[m' $(find . -name '*.css' -o -name '*.ts' -o -name '*.tsx' | grep -v node_modules | xargs wc -l | tail -1 | awk '{print $1}') |
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
const Jxa = import('run-jxa'); | |
const Twitter = require('twitter'); | |
const client = new Twitter({ | |
consumer_key: process.env.TWITTER_CONSUMER_KEY, | |
consumer_secret: process.env.TWITTER_CONSUMER_SECRET, | |
access_token_key: process.env.TWITTER_ACCESS_TOKEN_KEY, | |
access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET, | |
}); |
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
(() => { | |
return ` | |
"abort scrolling" | |
clearInterval(${scrollToTheEnd()}); | |
"total images count" | |
document.querySelectorAll('.AdaptiveMedia img').length; | |
` | |
function scrollToTheEnd(interval = 800) { | |
const theEnd = document.querySelector('#timeline .stream-end') |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Lyric Translation Builder</title> | |
<style> | |
body { | |
text-align: center; | |
} |
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 default function equal<T>(a: T, b: T): boolean { | |
return typeof a === 'object' ? Object.keys(a).every(<K extends keyof T>(key: K) => equal(a[key], b[key])) : a === b | |
} | |
export function refer<T, K extends keyof T>(variable: T, property: K): T[K] { | |
return variable[property] | |
} | |
Array.prototype.dedupe = function dedupe<T>(comparison?: ((val1: T, val2: T) => boolean)|string, ...key: string[]): T[] { | |
if (typeof comparison === 'string') { |
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
{ | |
"name": "care-me-followers", | |
"version": "1.0.0", | |
"description": "Health condition dashboard", | |
"main": "index.js", | |
"author": "gutchom", | |
"license": "MIT", | |
"homepage": "https://github.com/gutchom/care-me-followers#readme", | |
"repository": { | |
"type": "git", |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Verticalizer</title> | |
</head> | |
<body> | |
<form> | |
<textarea id="source" cols="40" rows="16"> | |
縦書きの |
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
All files are MIT Licence. |
NewerOlder