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
.transparent { | |
zoom: 1; | |
filter: alpha(opacity=70); | |
opacity: 0.7; | |
} |
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
ifconfig en0 | grep inet | |
if [ -z "$1" ]; then | |
python -m SimpleHTTPServer 8080 | |
else | |
python -m SimpleHTTPServer $1 | |
fi |
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
if [ "$1" == "develop" ] || [ "$1" == "d" ] || [ -z "$1" ]; then | |
echo "Pushing to develop..." | |
git push code develop | |
elif [ "$1" == "master" ] || [ "$1" == "m" ]; then | |
echo "Pushing to master..." | |
git push code master | |
else | |
echo "Push feature/$1..." | |
git push code "feature/$1" | |
fi |
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
if [ "$1" == "develop" ] || [ "$1" == "d" ] || [ -z "$1" ]; then | |
echo "Pushing to develop..." | |
git pull code develop | |
elif [ "$1" == "master" ] || [ "$1" == "m" ]; then | |
echo "Pushing to master..." | |
git pull code master | |
else | |
echo "Push feature/$1..." | |
git pull code "feature/$1" | |
fi |
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
git add -A . | |
if [ -z "$0" ]; then | |
git commit -am "- undefined -" | |
else | |
git commit -am "$*" | |
fi |
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
// Transforms a string to either upper or lowercase, depending which is dominant | |
// code => code | |
// coDe => code | |
// CoDE => CODE | |
// etc. | |
const transform = input => { | |
const lower = [...input].reduce((count, char) => { | |
return char == char.toLowerCase() ? count + 1 : count | |
}, 0) | |
return lower / input.length >= .5 ? input.toLowerCase() : input.toUpperCase() |
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
window.App.startLocalMedia(video, screencapture, audioonly, receiveonly, null, null).then( | |
function(o) { | |
if (!receiveonly) { | |
fm.liveswitch.Log.info('Started local media.') | |
} | |
fm.liveswitch.Log.info('Registering...') | |
window.App.joinAsync(_this.incomingMessage, _this.peerLeft, _this.peerJoined, _this.clientRegistered).then( | |
function(o) { |
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 timedResolve = name => { | |
return new Promise(resolve => | |
setTimeout(() => { | |
console.log(name) | |
resolve() | |
}, 500 * Math.random()), | |
) | |
} | |
Promise.all([ |
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
<div id="app"></div> | |
<script> | |
// Create virtual node | |
function h(tag, props, children) { | |
// Return the virtual node | |
return { | |
tag, | |
props, | |
children, | |
} |
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
<script> | |
let activeEffect | |
class Dep { | |
// Initialize the value of the reactive dependency | |
constructor(value) { | |
this._value = value | |
this.subscribers = new Set() | |
} |
OlderNewer