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
dir='/usr/local/Cellar/cowsay/3.04/share/cows/' | |
file=`/bin/ls -1 "$dir" | gsort --random-sort | head -1` | |
cow=$(echo "$file" | sed -e "s/\.cow//") | |
fortune | cowsay -f $cow |
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 you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="norm" |
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 hackathonId = null; | |
fetch('https://api.shawee.io/api/graphql', { | |
method: 'POST', | |
headers: { | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ | |
query: | |
'query hackathonRoles($link: String!) {\n hackathon(link: $link) {\n id\n roles {\n id\n name\n __typename\n }\n __typename\n }\n}\n', | |
variables: { link: 'shawee-test' }, |
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 class="modal-container"> | |
<div class="modal-skin"></div> | |
<div class="modal modal-signup"> | |
<div class="modal-header"> | |
<h1 class="modal-header-title"> | |
Inscreva-se | |
</h1> | |
<div class="btn-close"> | |
</div> | |
</div> |
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
// First we get the form instance and add an listener for the submit event | |
var form = document.querySelector('.form'); | |
form.addEventListener('submit', function(e) { | |
e.preventDefault(); | |
var serialized = $('#submitForm').serializeArray(); | |
var btnSend = document.querySelector('.btn-send'); | |
btnSend.setAttribute('disabled', ''); | |
btnSend.setAttribute('style', 'cursor: not-allowed'); | |
// then we build the POST request to shawee API with all the variables to fill in the participant profile |
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 { person } = this.state; | |
if (person) { | |
if (person.infos) { | |
if (person.infos.location) { | |
return ( | |
<span>{person.infos.location}</span> | |
); | |
} | |
} |
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 location = idx(this.state, _ => _.person.infos.location); | |
return ( | |
<span>{location}</span> | |
); |
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 form = document.querySelector('.form'); | |
form.addEventListener('submit', function(e) { | |
e.preventDefault(); | |
var serialized = $('#submitForm').serializeArray(); | |
var btnSend = document.querySelector('.btn-send'); | |
btnSend.setAttribute('disabled', ''); | |
btnSend.setAttribute('style', 'cursor: not-allowed'); | |
jQuery.ajax({ | |
url: 'https://api.shawee.io/api/graphql', | |
type: 'POST', |
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
/* modal */ | |
.modal-container { | |
position: fixed; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
top: 0; | |
display: flex; | |
background: rgba(0, 0, 0, 0.3); | |
align-items: center; |
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 modal = document.querySelector('.modal-container'); | |
var btnOpen = document.querySelectorAll('.btn-open'); | |
var btnClose = document.querySelector('.btn-close'); | |
var modalSkin = document.querySelector('.modal-skin'); | |
for (var i = 0; i < btnOpen.length; i++) { | |
btnOpen[i].addEventListener('click', function() { | |
modalToggle(); | |
}); | |
} |
OlderNewer