Skip to content

Instantly share code, notes, and snippets.

View thejungwon's full-sized avatar
🦄
Focusing

Jungwon Seo thejungwon

🦄
Focusing
View GitHub Profile
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
<property>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://master:9000</value>
</property>
</configuration>
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>/usr/local/hadoop/data/nameNode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/usr/local/hadoop/data/dataNode</value>
</property>
<property>
.change-btn{
position: absolute;
bottom: 20px;
font-size: 20px;
cursor:pointer;
display: none;
}
.change-btn:hover{
transition: all 0.5s ease-out;
text-decoration: underline;
<div class="change-btn">
Choose a new interest
</div>
function newimage(keyword){
if(!ACCESS_KEY){
alert("Please update your access key");
return;
}
var url = `https://api.unsplash.com/search/photos?query=${keyword}&per_page=20&orientation=landscape&client_id=${ACCESS_KEY}`;
$.get(url,function(data){
var picture = data.results[0];
var picture_url = picture.urls.raw;
$('.greeting').html(`Hello <span class="stored-name">${username}</span>.`);
var picture_url = getCookie('picture');
if(!picture_url){
newimage(interest);
picture_url = getCookie('picture');
}
$('body').css('background-image',`url(${picture_url})`);
function newimage(keyword){
if(!ACCESS_KEY){
alert("Please update your access key");
return;
}
var url = `https://api.unsplash.com/search/photos?query=${keyword}&per_page=20&orientation=landscape&client_id=${ACCESS_KEY}`;
$.get(url,function(data){
var picture_url = data.results[0].urls.raw;
setCookie("picture",picture_url,0.5);
$('body').css('background-image',`url(${picture_url})`);
$('.interest').keypress(function(e) {
if(e.which == 13) {
var interest = e.target.value;
if(!interest) return;
newimage(interest);
if(!getCookie('picture')) return;
$('.interest').fadeOut(function(){
$('.greeting').html(`Hello ${username}.`);
$('.greeting').fadeIn(function(){
setCookie('interest', interest,365);
var username = getCookie('username');
//check cookie
if(username){
$('.greeting').css('display','inline-block');
$('.user-name').css('display','none');
var interest = getCookie('interest');
if(interest){
$('.interest').css('display','none');
$('.interest-text').html(interest);