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
# Batch resize and rename images | |
for x in *.png; do root=`echo $x | sed -e "s/.png//"`; convert $x -resize 200x200 ${root}-200x200.png; done | |
for x in *.jpg; do root=`echo $x | sed -e "s/.jpg//"`; convert $x -resize 48x48 ${root}-48x48.jpg; done | |
# Create Sierra USB Install Disk | |
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia \ | |
--volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app | |
## Linux |
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
#!/usr/local/bin/python | |
import socket | |
import webbrowser | |
import re | |
import netifaces | |
UDP_IP = netifaces.ifaddresses('en0')[netifaces.AF_INET][0]['broadcast'] | |
UDP_PORT = 48735 |
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 { ipcRenderer } = require('electron') | |
document.addEventListener('DOMContentLoaded', () => { | |
console.log('DOM Ready!') | |
}) | |
console.log('Script Injected!') |
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
for i in *.mov; | |
do name=`echo $i | cut -d'.' -f1`; | |
echo $name; | |
# MP4 IE 11 | |
#ffmpeg -i "${name}.mov" -vcodec h264 -acodec aac -strict -2 "../web/${name}.mp4"; | |
# MP4 (best compatibility) | |
ffmpeg -an -i "${name}.mov" -y -cpu-used 8 -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 "../web/${name}.mp4"; | |
# VP8 | |
#ffmpeg -i "${name}.mov" -vcodec libvpx -qmin 0 -qmax 50 -crf 10 -b:v 1M -acodec libvorbis "../web/${name}.webm"; | |
# VP9 |
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
'use strict' | |
import { app, BrowserWindow } from 'electron' | |
/** | |
* Set `__static` path to static files in production | |
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html | |
*/ | |
if (process.env.NODE_ENV !== 'development') { | |
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\') |
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
{ | |
"name": "gsap-to-video", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"fs-extra": "^7.0.0", | |
"puppeteer": "^1.7.0" | |
} | |
} |
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
# Disable Chrome's auto sign-in | |
defaults write com.google.Chrome RestrictSigninToPattern -string ".*@example.com" | |
# Font smoothing on VSCode (macOS Mojave) | |
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO |
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
// 407 bytes minified | |
{ | |
let ls = localStorage | |
let loc = location | |
let option = prompt('s/ave, c/lear, f/ill', 'f') | |
let index = option[0] == 'h' ? 1 : 0 | |
let key = 'f:' + (index ? loc.host : loc.href) | |
let elems = document.querySelectorAll('input:not([type="file"]),textarea,select') | |
option[index] == 's' && ls.setItem( |
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
sudo locale-gen "en_US.UTF-8" | |
sudo dpkg-reconfigure locales | |
# in file /etc/default/locale add line LC_ALL="en_US.UTF-8" and relogin |
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 config --global alias.pushf "push --force-with-lease" | |
# git config --global alias.mnff "merge --no-ff" | |
BRANCH="epic/CompraEnApp/feature/layout-helper" | |
DEVELOP="epic/CompraEnApp/develop" | |
git checkout $DEVELOP && git pull | |
git checkout $BRANCH |