Skip to content

Instantly share code, notes, and snippets.

View ROBERT-MCDOWELL's full-sized avatar

ROBERT MCDOWELL ROBERT-MCDOWELL

View GitHub Profile
@berstend
berstend / AllowFlashInChromium.md
Last active January 22, 2020 10:21
Allow flash content to run by default in Chromium by using a management policy file

Tested on Ubuntu 14.04 and Chromium 65

Steps

apt-get install chromium-browser adobe-flashplugin

mkdir -p /etc/chromium/policies/managed

vim /etc/chromium/policies/managed/foo_policy.json
@tcurvelo
tcurvelo / takeout.js
Created April 18, 2018 00:46
WIP: Automating Google Takeout Download
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await page.goto('https://takeout.google.com/');
const input = await page.evaluate(() => {
const next = document.querySelector('#identifierNext');
@rigelk
rigelk / peertube.conf
Last active April 30, 2024 13:40
a now OUTDATED httpd/Apache vhost to run PeerTube | note that only Nginx is supported by the PeerTube team, and with this or any other Apache configuration, you will likely get NO SUPPORT.
# requires WebSocket support with `a2enmod proxy_wstunnel`
# check https://ssl-config.mozilla.org/#server=apache&version=2.4.41&config=modern&openssl=1.1.1d&hsts=false&ocsp=false&guideline=5.6 for hardening security
<VirtualHost *:80 [::]:80>
ServerName peertube.example.com
ServerAdmin webmaster@example.com
Protocols h2c http/1.1
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
@pvmart
pvmart / arch-raid1.sh
Last active May 18, 2023 15:03
Install arch linux on btrfs raid1
#!/bin/bash
set -e
set -o pipefail
dd if=/dev/zero of=/dev/sda bs=1024 count=10
dd if=/dev/zero of=/dev/sdb bs=1024 count=10
RAM=$(free -m | awk '/Mem:/{print $2}')
@xlanor
xlanor / abrtcmd.txt
Created September 28, 2017 16:20
Fedora 26 - Disable abrt
#ABRT was spamming my fedora system with updates nonstop.
sudo systemctl -t service | grep abrt
sudo systemctl stop abrt-journal-core.service
sudo systemctl disable abrt-journal-core.service
sudo systemctl stop abrt-oops.service
sudo systemctl disable abrt-oops.service
sudo systemctl stop abrt-xorg.service
sudo systemctl disable abrt-xorg.service
sudo systemctl stop abrtd.service
@ruzickap
ruzickap / livemedia-creator_make-pxe-live
Created July 16, 2017 07:23
Create PXE live files form Fedora 26 using lorax
# livemedia-creator --make-pxe-live --live-rootfs-keep-size --image-name=my_fedora_img --tmp=/var/tmp/a --ks fedora26-my.ks --iso=/home/ruzickap/data2/iso/Fedora-Workstation-netinst-x86_64-26-1.5.iso --resultdir=/var/tmp/a/result
/usr/lib64/python3.5/optparse.py:999: PendingDeprecationWarning: The KSOption class is deprecated and will be removed in pykickstart-3. Use the argparse module instead.
option = self.option_class(*args, **kwargs)
2017-07-16 08:12:28,922: disk_img = /var/tmp/a/result/my_fedora_img
2017-07-16 08:12:28,923: Using disk size of 6002MiB
2017-07-16 08:12:28,923: install_log = /var/tmp/lorax/virt-install.log
2017-07-16 08:12:29,161: qemu vnc=127.0.0.1:0
2017-07-16 08:12:29,161: Running qemu
2017-07-16 08:12:29,286: Processing logs from ('127.0.0.1', 52518)
2017-07-16 08:40:25,126: Installation finished without errors.
@ryohey
ryohey / convert.js
Created May 23, 2017 04:13
Convert YUV420(I420) Progressive Planar to RGB in JavaScript
const WIDTH = 176
const HEIGHT = 144
const progRGB = yuv420ProgPlanarToRgb(base64ToArrayBuffer(yuv420ProgPlanarImage()), WIDTH, HEIGHT)
const canvas = document.createElement("canvas")
document.body.appendChild(canvas)
const ctx = canvas.getContext("2d")
const imageData = ctx.createImageData(WIDTH, HEIGHT)
putRGBToRGBA(imageData.data, progRGB, WIDTH, HEIGHT)
ctx.putImageData(imageData, 0, 0)
@sid24rane
sid24rane / udp.js
Created July 25, 2016 08:39
Simple UDP Client and Server in Node.js ==> ( Echo Server )
var udp = require('dgram');
// --------------------creating a udp server --------------------
// creating a udp server
var server = udp.createSocket('udp4');
// emits when any error occurs
server.on('error',function(error){
console.log('Error: ' + error);
@vandot
vandot / geoipbind.py
Created March 16, 2016 00:52
Fetch geoip data and create Bind9 ACL based on continents for poor man's GSLB service
#!/usr/bin/env python
import csv
import urllib
import zipfile
import os
link = 'http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip'
csv1 = 'GeoLite2-Country-Blocks-IPv4.csv'
csv2 = 'GeoLite2-Country-Locations-en.csv'
@yurydelendik
yurydelendik / !wasmllvm.md
Last active February 23, 2024 05:08
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR