sudo apt install -y openjdk-8-jdk
You can switch between java version with
sudo update-alternatives --config java
check with:
java --version; javac --version
ffmpeg -i 1080p.mp4 -s 800x480 -c:v libx264 480p.mp4 -s 640x360 -c:v libx264 360p.mp4 -s 320x240 -c:v libx264 240p.mp4 |
from flask import Flask, render_template, request | |
app = Flask(__name__) | |
@app.route('/', methods=['GET', 'POST']) | |
def hello(): | |
# respond only if the method is POST | |
# i.e. user clicked submit | |
if request.method == 'POST': | |
name=request.form.get('name', 'world') |
#!/usr/bin/bash | |
# Quickly host a static server using python3 | |
# Usage: | |
# -p <PORT> | |
# -d <DIR> the directory to serve | |
# -i <IP> the ip to bind to | |
# defaults values | |
PORT=3000 | |
DIR=. # current dir |
import Hammer from "https://cdn.skypack.dev/[email protected]"; | |
var hammertime = new Hammer(document.querySelector('html'), {}); | |
hammertime.on('swiperight', e => { | |
const endPoint = e.pointers[0].pageX | |
const distance = e.distance | |
const origin = endPoint - distance | |
// swipe only within 10px from the edge | |
if (origin <= 10) | |
console.log(e) |
// Copyright (c) 2021 oskr.nl | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// const MyApp({Key? key}): super(key: key); |
const express = require('express') | |
const app = express() | |
// ~ all routes | |
// last route | |
app.use((req, res) => { | |
res.status(404).send('Custom 404 handler') | |
}) |
logo = document.querySelector('#logo') | |
document.addEventListener('scroll', e => { | |
let yo = parseInt(pageYOffset) | |
let maxHeight = 150 | |
if(yo <= maxHeight) { | |
let per = (yo / maxHeight) * 100 | |
// console.log(yo, ' ----> ', per, '// ', Math.abs(per - 100)) | |
logo.style.scale = `clamp(0.75, ${Math.abs(per - 100) * 0.01}, 1)` | |
} | |
}) |
# Turn off that annoying start up message | |
startup_message off | |
# Turn the even more annoying whole-screen-flash-on-tab-complete "feature" | |
vbell off | |
# Window list at the bottom. hostname, centered tabs and redmarked active windows: | |
#shelltitle '$ |' | |
backtick 1 1 1 $HOME/bin/battery |
{ | |
"name": "something", | |
"version": "2.2.0", | |
"description": "", | |
"main": "index.js", | |
"dependencies": { | |
"ejs": "^3.1.5", | |
"express": "^4.17.1", | |
"helmet": "^4.2.0" | |
}, |