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 size = 20; | |
for (var i = 0; i < size; i += 2) { | |
var line = new Array((size - i) / 2 | 0).join(' '); | |
for (var y = 0; y <= i; y++) { | |
line += i ? (Math.random() * 10 % 10 | 0) === 0 ? ['🔴', '🔵'][y % 2] : '🍃' : '⭐️'; | |
} | |
console.log(line); | |
} |
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 | |
API_KEY="abc123" | |
API="https://picpig.com/api/$API_KEY" | |
FILE="screencapture-`date +%s`.png" | |
# Capture screen interactively by selection or window | |
screencapture -i $FILE |
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 | |
# Usage: bash picpig.sh {FILE} {API_KEY} | |
# Example: bash picpig.sh test.png abc123 | |
API="https://picpig.com/api/$2" | |
MIME=$(file --mime-type $1 | awk '{print $2}') | |
if [ ${MIME:0:5} == "image" ] |
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
* { | |
margin: 0; | |
padding: 0; | |
background: none; | |
border: 0; | |
-webkit-text-size-adjust: 100%; | |
} | |
*, | |
*:before, |
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 PS1="\[$(tput bold)\]\[$(tput setaf 6)\]\u\[$(tput setaf 7)\]@\[$(tput setaf 2)\]\h \[$(tput setaf 3)\]\w\[$(tput setaf 1)\]\$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/') \[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]" |
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
@function cmyk($c, $m, $y, $k) { | |
$c: $c / 100; | |
$m: $m / 100; | |
$y: $y / 100; | |
$k: $k / 100; | |
$r: 255 * (1 - $c) * (1 - $k); | |
$g: 255 * (1 - $m) * (1 - $k); | |
$b: 255 * (1 - $y) * (1 - $k); |