Skip to content

Instantly share code, notes, and snippets.

View 174n's full-sized avatar

Ivan Alexandrov 174n

View GitHub Profile
@174n
174n / notes.js
Last active April 30, 2017 19:07
Widgets
var notes = $("<div />", {"class": "test notes"})
.append(
$("<textarea />",{
"css": {
"width":"100%",
"height":"120px",
"resize": "vertical",
"padding":"5px"
}
})
@174n
174n / getMP3.js
Last active January 14, 2018 10:34
audioknigi.club
"https://audioknigi.club/rest/bid/"+/audioPlayer\((.*?),/g
.exec(document.querySelector("#content > div > article > div.main-frame > script:nth-child(3)").innerHTML)[1]
@174n
174n / vm.commands.txt
Created February 6, 2018 00:54
Tiny Core Linux: LAMP
qemu/qemu-img.exe create -f vpc tc.vhd 4G
---
qemu\qemu-system-i386 -L qemu\bios.bin -m 1024 -kernel vmlinuz -initrd core.gz -hda tc.vhd -append "home=sda1 opt=sda1 tce=sda1" -redir tcp:2222::22 -redir tcp:80::80 -nographic
---
printf "o\nn\np\n1\n\n\nw\n" | sudo fdisk /dev/sda
sudo mkfs.ext4 /dev/sda1
sudo reboot
---
tce-load -wi openssh
cd /usr/local/etc/ssh/
@174n
174n / index.html
Last active January 24, 2019 22:37
textConverter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>[Text Converter]</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Montserrat:300,400,900'>
<style>
*, input, textarea {
@174n
174n / README.md
Last active March 15, 2019 16:48
Terminal IDE

IDE in terminal

Fonts

Nerdfonts: https://nerdfonts.com/

mkdir -p ~/.local/share/fonts && \
cd ~/.local/share/fonts && curl -fLo "Fura Code Regular Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode/Regular/complete/Fura%20Code%20Regular%20Nerd%20Font%20Complete.otf?raw=true
@174n
174n / xmpp_bosh_server_list.json
Last active April 8, 2019 18:16
XMPP BOSH server list
[
{
"url": "https://arcipelago.ml:5280/http-bind",
"login": [
"PLAIN",
"SCRAM-SHA-1",
"X-OAUTH2"
],
"register": true,
"capcha": true
const json2xml = json =>
Object.keys(json)
.map(k =>
typeof json[k] === "object" && k !== "_attr"
? `<${k +
(json[k]["_attr"]
? " " + Object.keys(json[k]["_attr"]).map(
a => `${a}="${json[k]["_attr"][a]}"`
).join(" ")
: "")
@174n
174n / downloadAria2c.bat
Last active June 4, 2019 15:37
download aria2c bat file
@echo off
if not exist "%~dp0aria2c.exe" (
echo Downloading aria2c.exe...
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://uupdump.ml/autodl_files/aria2c.exe', '%~dp0aria2c.exe')"
)
call :checkhash "3eb8712b0db6ba466f8afe1bf606983fe8341c941bdfcadc07068288c7ca5a9c" "aria2c.exe"
goto start
const mysql = require("mysql");
const faker = require('faker');
faker.locale = "de";
/* Generic stuff
==========================================*/
const getArray = number =>
[...new Array(number)];
@174n
174n / jellyfin.js
Last active January 29, 2020 23:50
UserScript for controlling playback speed in Jellyfin
// ==UserScript==
// @name Speed control - localhost:8096
// @namespace Violentmonkey Scripts
// @include http://localhost:8096/*
// @grant none
// @version 1.0
// @author -
// @description 1/30/2020, 12:16:50 AM
// ==/UserScript==