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
FROM debian:stable-slim | |
RUN apt update | |
RUN apt install -y \ | |
curl git wget python3 \ | |
zip unzip apt-transport-https \ | |
ca-certificates gnupg clang \ | |
cmake ninja-build pkg-config \ | |
libgconf-2-4 gdb libstdc++6 \ | |
libglu1-mesa fonts-droid-fallback \ |
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
goToTop() { | |
const scrollToTop = window.setInterval(() => { | |
const pos = window.pageYOffset; | |
if (pos > 0) { | |
window.scrollTo(0, pos - 20); | |
} else { | |
window.clearInterval(scrollToTop); | |
} |
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
/** | |
* Version 1 | |
*/ | |
download(doc?: any): void { | |
const filename = 'https://via.placeholder.com/350x150'; | |
const link = document.createElement('a'); | |
link.style.display = 'none'; | |
link.href = filename; | |
link.target = '_blank'; |
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 oldHref = document.location.href; | |
window.onload = function() { | |
var bodyList = document.querySelector("body"); | |
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
if (oldHref != document.location.href) { | |
oldHref = document.location.href; | |
console.log("LOCATION CHANGE:", oldHref); |
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
.mb-0 { | |
margin-bottom: 0!important; | |
} | |
.mb-1 { | |
margin-bottom: .25rem!important; | |
} | |
.mb-2 { | |
margin-bottom: .5rem!important; | |
} | |
.mb-3 { |
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
'use strict'; | |
// Example Usage: | |
// const logger: any = require("./logger.js"); | |
// const app = new Koa(); | |
// app.use(logger()); | |
const chalk = require('chalk'); | |
const winston = require("winston"); |
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
function handleResize() { | |
const heights = {}; | |
heights.window = window.innerHeight; | |
const [contactsTable] = document.getElementsByClassName('contacts-table'); | |
if (contactsTable) { |
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
<style> | |
.video-wrapper | |
{ | |
position: relative; | |
padding-bottom: 51.5%; | |
padding-top: 25px; | |
height: 0; | |
border-radius: 4px; | |
overflow: hidden; |
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
#!/bin/bash | |
# Saves the last frame of | |
# mp4/h264 matroska as png | |
# with ffmpeg | |
input_fn='output.mp4' | |
image_fn='output.png' |
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
#!/bin/bash | |
echo '# Running apt-get update ...' | |
apt-get update | |
echo '# Installing imagemagick ...' | |
apt-get install -y imagemagick | |
echo '# Installing blender ...' | |
apt-get install -y software-properties-common | |
add-apt-repository -y ppa:thomas-schiex/blender | |
apt-get install -y blender | |
echo '# Installing python-pip ...' |
NewerOlder