Skip to content

Instantly share code, notes, and snippets.

View Shrekie's full-sized avatar
💐

Thomas Lindauer Shrekie

💐
View GitHub Profile
@maledorak
maledorak / dmenu_hotkeys.py
Last active May 29, 2023 07:27
i3 hotkeys in dmenu or rofi
#!/usr/bin/env python3
import os
import sys
from re import compile
from subprocess import run, Popen, PIPE
__author__ = "Mariusz 'Maledorak' Korzekwa"
__credits__ = ["Mariusz 'Maledorak' Korzekwa"]
__license__ = "CC BY 4.0"
@steven2358
steven2358 / ffmpeg.md
Last active May 5, 2024 12:45
FFmpeg cheat sheet
@dominicfraser
dominicfraser / docker_node_express_react_redux_postgres.md
Last active May 4, 2024 12:20
Dockerizing Node-Express-React-Redux-PostgreSQL Ap

Dockerizing Node-Express-React-Redux-PostgreSQL App

The full context of the code shown here can be viewed here

|-- package.json
|-- docker-compose.yml
|-- config.js
|-- table_tennis.sql
|-- zseeds.sql
@napoli1890
napoli1890 / angularjs-seconds-to-time.js
Created April 15, 2016 08:46
AngularJS Filter that convert Seconds to Time String
app.filter('secondsToDateTime', [function() {
/**
* This code returns a date string formatted manually.
* Code "new Date(1970, 0, 1).setSeconds(seconds)" returns malformed output on days.
* Eg. 4 days, magically becomes 5, 15 becomes 16 and so on...;
* */
return function(seconds) {
var days = Math.floor(seconds/86400);
var hours = Math.floor((seconds % 86400) / 3600);
var mins = Math.floor(((seconds % 86400) % 3600) / 60);
@ajardin
ajardin / capture.html
Created February 8, 2016 08:51
Capture a thumbnail from a video with JavaScript.
<!DOCTYPE html>
<head>
<script type='text/javascript'>
window.onload = function () {
var video = document.getElementById('videoId');
var canvas = document.getElementById('canvasId');
var img = document.getElementById('imgId');
video.addEventListener('play', function () {
canvas.style.display = 'none';
@Aymkdn
Aymkdn / popup_draggable.html
Last active April 27, 2019 04:45
Draggable DIV cross-browser (from IE8) with pure JavaScript
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="popup" style="background-color:green;position:absolute;top:0px;left:0px;width:250px;height:250px;z-index:9999;box-shadow: 6px 6px 5px #888888;border-radius:6px;border:1px solid #4f4f4f;">
<div id="popup_bar" style="width:100%;background-color:#aaff66;position:relative;top:0;border-radius:6px 6px 0 0; text-align:center;height:24px;cursor:move">Title</div>
<p>Content of the popup</p>
</div>
</body>
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active March 29, 2024 08:38
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@max-te
max-te / youtube.js
Created September 17, 2012 15:56
Download Youtube-Video in node.js
var http = require('http')
var fs = require('fs')
var argv = require('optimist').argv
var rxVideoID = /v=([\]\[!"#$%'()*+,.\/:;<=>?@\^_`{|}~-\w]*)/
var link = argv._.toString()
var videoID = link.match(rxVideoID)[1]
http.get("http://www.youtube.com/get_video_info?video_id="+videoID, function(res) {
var chunks = []