// Find the hostname
$ hostname
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
// Can't use arrow function with watch. | |
``` | |
watch: { | |
mySeconds: 'send', | |
hour(newValue) { | |
// You can use this here | |
const tl = new TimelineMax(); | |
tl.to(this, 0.5, { | |
animatedHour: newValue, | |
delay: 0, |
Can't work with vuejs-logger.
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
// draw border with step | |
float drawBorder(vec2 st, float thickness) { | |
// bottom-left | |
vec2 bl = step(vec2(thickness),st); | |
// top-right | |
vec2 tr = step(vec2(thickness),1.0-st); | |
float pct = bl.x * bl.y * tr.x * tr.y; | |
return pct; | |
} |
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 num in (1..5) | |
.menu-{num} | |
background-image: url('/img/photo' + num + '.jpg'); |
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
// Velociy | |
animation($target) { | |
$target.velocity( | |
{ | |
opacity: 1 | |
}, | |
{ | |
queue: false, | |
begin: () => { | |
console.log('animation begin', $target); |
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
ul#list | |
- len = data.list.length | |
- for(var i = 0; i < len; i++) | |
li(class='list ' + ' list-' + data.list[i].category data-groups='["' + data.list[i].category + '"]') | |
a(href='' + data.list[i].id + '/') | |
img.thumbImg(src='/common/movie_s/mobile/' + data.list[i].id + '/thumb.jpg') | |
p !{data.list[i].title} [!{data.list[i].location}] | |
// print data object | |
p !{JSON.stringify(data)} |
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
this.btn.on('click', ()=>{ | |
this.onBtnClicked(); | |
}); | |
// Repeat | |
setInterval(()=>{ | |
console.log('set setInterval!'); | |
}, 250); | |
// Once |
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
/* ------------------------------- | |
DEBUG | |
------------------------------- */ | |
/* prints Output sentence on screen */ | |
cout << "DONE!: \n"; | |
cout << "Position: " << position << "\n"; | |
ofLog() << " event at " << f << endl; | |
/* ------------------------------- |