Skip to content

Instantly share code, notes, and snippets.

@kkm
kkm / youtube-upload.js
Created December 22, 2023 14:39 — forked from soygul/youtube-upload.js
YouTube video uploader using JavaScript and Node.js
// YouTube API video uploader using JavaScript/Node.js
// You can find the full visual guide at: https://www.youtube.com/watch?v=gncPwSEzq1s
// You can find the brief written guide at: https://quanticdev.com/articles/automating-my-youtube-uploads-using-nodejs
//
// Upload code is adapted from: https://developers.google.com/youtube/v3/quickstart/nodejs
const fs = require('fs');
const readline = require('readline');
const assert = require('assert')
const {google} = require('googleapis');
@kkm
kkm / console.log.js
Created February 25, 2023 23:39
Console.log with Date Format
// Console with DATE
var log = console.log;
console.log = function () {
var first_parameter = arguments[0];
var other_parameters = Array.prototype.slice.call(arguments, 1);
function formatConsoleDate(date) {
var hour = date.getHours();

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@kkm
kkm / .conkyrc
Created September 16, 2022 02:55
Conky Theme von kkm
# http://conky.sourceforge.net/variables.html
conky.config = {
update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
out_to_console = false,
override_utf8_locale = true,
double_buffer = true,
no_buffers = true,
text_buffer_size = 32768,
@kkm
kkm / gist:b600ee036559035cdfea8ec0de0d7795
Created March 16, 2022 21:26
the.putin.interviews.part.1.1080p.webrip.txt
1
00:00:06,834 --> 00:00:09,583
(orchestra playing patriotic,
Romantic Russian-themed music)
2
00:01:05,250 --> 00:01:06,375
(music fades)
3
@kkm
kkm / delay.js
Created July 10, 2021 02:10
await in promise
//https://stackoverflow.com/questions/46919013/puppeteer-wait-n-seconds-before-continuing-to-the-next-line
function delay(time) {
return new Promise(function (resolve) {
setTimeout(resolve, time)
});
}
@kkm
kkm / consolevariables.ini
Created April 29, 2020 04:12
ARK Modded INI
; C:\Program Files (x86)\Steam\steamapps\common\ARK\Engine\Config
;https://www.youtube.com/watch?v=-vT__yTrFKo
; https://pastebin.com/NhkxyY9t
;Lancast's fair game config.
[Startup]
foliage.UseOcclusionType=0
ShowFloatingDamageText=True
FogDensity=0.0
FrameRateCap=144
FrameRateMinimum=144
@kkm
kkm / gui.py
Created April 18, 2020 09:47
GrowPiGui - raspberry touch
from Tkinter import *
import tkFont
import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
cred = credentials.Certificate('serviceAccountKey.json')
firebase_admin.initialize_app(cred, {
'databaseURL': 'https://growpi.firebaseio.com/'
putty -ssh [email protected] -pw xxxxx -P 80 -D 8080
@kkm
kkm / co2_read_value.js
Created March 5, 2019 14:11
Raspberry GrovePi+ with Co2 in nodejs
const struct = require('python-struct');
var serialport = require('serialport');
var SerialPort = serialport;
var port = new SerialPort('/dev/ttyAMA0', {
baudRate: 9600
});
port.on('open', function () {
console.log('Port geöffnet /dev/ttyAMA0 @ 9600 bds');