<button>Let's Go !</button>
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(global){ | |
'use strict'; | |
var JSON = global.JSON; | |
// @private | |
function whatType(o) { | |
return Object.prototype.toString.call(o).slice(8,-1).toLowerCase(); | |
} |
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(global, document){ | |
// @private | |
function getStyle(el, prop, pseudo) { | |
return window.getComputedStyle(el, pseudo)[prop]; | |
} | |
function setStyle(el, prop, value) { | |
return el.style[prop] = value; | |
} |
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(global, document) { | |
'use strict'; | |
var namespace = 'y9'; | |
function el(selector, context) { | |
return (context || document).querySelector(selector); | |
} | |
function els(selector, context) { | |
return (context || document).querySelectorAll(selector); |
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(global, document){ | |
'use strict'; | |
/* ----------------------------------------------------- | |
* DOM 선택 헬퍼 함수 */ | |
function els(selector, context) { | |
if (typeof selector !== 'string' || selector.trim().length === 0) { return null; } | |
context = !context ? document : context.nodeType === 1 ? context : el(String(context)); | |
return context.querySelectorAll(selector); |
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
# Failed to boot: | |
# Failed to start file system check on /dev/disk/by-uuid/.... | |
journalctl -xb | |
# (look at the disk label that fsck failed) | |
fsck /dev/sda3 | |
# |
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
console.log('Client-side code running'); | |
const button = document.getElementById('myButton'); | |
button.addEventListener('click', function(e) { | |
console.log('button was clicked'); | |
fetch('/clicked', {method: 'POST'}) | |
.then(function(response) { | |
if(response.ok) { | |
console.log('click was recorded'); |
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
/* ******************************************************************************************* | |
* GLOBAL OBJECTS > ARRAY | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array | |
* ******************************************************************************************* */ | |
// Global object: properties | |
Array.length // Reflects the number of elements in an array | |
// Global object: methods |
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
1-In the github repo on Settings > Integration & Services, enable | |
2-Go to travisCI page and enable the repo | |
3-Configure the env variables on TravisCI so that it is not necessary to save credentials on github | |
-in the project Settings on TravisCI, add the entry for netlify site id: NETLIFY_SITE_ID - <site_id from .netlify file generated on netlify create> | |
-create a netlify access token for TravisCI | |
-On Netlify Dashboard, Go to Account Settings > OAuth Applications (https://app.netlify.com/account/applications) > Personal access tokens and press New Access Token | |
-Name it anything, but to make it easier the suggestion is name TravisCI. | |
-Generate it and COPY it - you won’t see it again! | |
-in the project Settings on TravisCI, add the entry for netlify personal access token generated for TravisCI: NETLIFY_ACCESS_TOKEN | |
4-Generate a .travis.yml file in the local repo |
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
#!/usr/bin/env python | |
# Use /usr/bin/env python to support virtual environments | |
# This script is for Python > 3.6 | |
# -*- coding: utf-8 -*- | |
""" | |
Test loading mock initial alliances data into a test table with asyncpg and Postgres | |
""" | |
import datetime | |
import json |