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 a specific mysql version: | |
$(brew --prefix mysql@5.7)/bin/mysqladmin -u root -p password NEWPASS | |
#for generic | |
$(brew --prefix mysql)/bin/mysqladmin -u root -p password NEWPASS | |
#may or may not need -p, depending on if you know the pass or not |
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
//uses hammer.js to detect swipe and trigger next/prev buttons | |
//counts numbers of child items to handle carousel and add bullets in mobile view | |
eventSlider: function() { | |
var marginArray = []; | |
var i = 0; | |
var length = jQuery('.home--2-col-events--right--slider-slide').length; | |
//set container and child widths | |
jQuery('.home--2-col-events--right--slider-container').css( | |
'width', ((length * 100) + 1) + '%' |
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
GENERAL: | |
- every element must be in a html tag with inline styles | |
- complex/responsive designs will break | |
- tables are best as they are supported and handle fluid layout across almost all email clients | |
- images and containers require html style attrs align="", width="", and height="" to keep design | |
- use padding instead of margin as some clients ignore margins | |
Outlook 2007/2013 | |
html tags override sizes, i.e. if you want a 48px <h6> it won't work, so use tags for sizing | |
user's security settings will define whether or not images load |
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
#REF: | |
#https://github.com/will-in-wi/letsencrypt-webfaction | |
#To install letsencrypt on webfaction | |
GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib gem2.2 install letsencrypt_webfaction | |
#Edit $HOME/.bash_profile to add the function below: | |
function letsencrypt_webfaction { |
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
let touchstartX = 0; | |
let touchstartY = 0; | |
let touchendX = 0; | |
let touchendY = 0; | |
const gestureZone = document.getElementById('gestureZone'); | |
gestureZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.changedTouches[0].screenX; | |
touchstartY = event.changedTouches[0].screenY; |
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 marginArray = ['0', '-100%', '-200%']; | |
var i = 0; | |
jQuery('#prev').click(function() { | |
i--; | |
i === -1 ? i = 2 : i; | |
jQuery('.slider-container').css('margin-left', marginArray[i]); | |
}); | |
jQuery('#next').click(function() { | |
i++; |
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
#config ssh: | |
#add rsa.pub to instance metadata | |
#1. go to gcloud instance, click edit | |
#2. go to 'custom metadata' section, add 'enable-oslogin':TRUE | |
#3. click 'show and edit' under SSH key section, add the contents outputted by command 'cat ~/.ssh/id_rsa.pub' to add your public ssh key (use the outputted username as the key here ex. benfausch) | |
#4. go to gcloud terminal through gcloud webpage, run 'mkdir .ssh && touch .ssh/authorized_keys', then authorized_keys > "your ouputted public ssh key here" | |
#5. go to normal terminal, then use same username gcloud uses in browser terminal (ex benjamin_fausch_gmail), your private SSH key, and the public IP of the instance | |
#=>=>=>=> ssh -i id_rsa benjamin_fausch@35.123.17.04 | |
#6. then you can just use ssh benjamin_fausch@35.xxx and create an alias |
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
let randomOpacity = (Math.random() * (0.50 - 1) + 1).toFixed(2); | |
// in react: | |
<p key={k} style={{opacity: randomOpacity}}> |
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
let randomColor = '#' + (Math.random() * 0xFFFFFF << 0).toString(16); |