Tested on Ubuntu 14.04 and Chromium 65
apt-get install chromium-browser adobe-flashplugin
mkdir -p /etc/chromium/policies/managed
vim /etc/chromium/policies/managed/foo_policy.json
#!/bin/bash | |
wget() { | |
local PROTO=${1%%://*} | |
local NOPROTO=${1#*://} | |
local HOST=${NOPROTO%%/*} | |
local PORT=${HOST#*:} | |
[ "${HOST}" = "${PORT}" ] && PORT=80 | |
HOST=${HOST%:*} | |
local URI=${NOPROTO#*/} |
<?php | |
function weekNumberToDate($year, $week, $wday = 1) { | |
// http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday | |
$correction = (int)gmdate('w', gmmktime(0, 0, 0, 1, 4, (int)$year)) + 3; | |
$yday = (int)$week * 7 + (int)$wday - $correction; | |
$time = gmmktime(0, 0, 0, 1, $yday, (int)$year); | |
return array((int)gmdate('Y', $time), (int)gmdate('n', $time), (int)gmdate('j', $time)); | |
} | |
var_dump(weekNumberToDate(2008, 39, 6)); |
# 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. |
#!/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' |
package util | |
{ | |
import flash.display.DisplayObject; | |
import flash.events.Event; | |
import flash.events.EventDispatcher; | |
import flash.events.TimerEvent; | |
import flash.utils.getTimer; | |
/** | |
* This is the timer class based on getTimer(). |
#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 |
#!/bin/bash | |
# WebSocket shell, start & browse to http://<Host>:6655/ | |
# Requires bash 4.x, openssl. | |
# Author: rootshell@corelogics.de (which isn't me, apk) | |
coproc d { nc -l -p 6656 -q 0; } | |
nc -l -p 6655 -q 1 > /dev/null <<-ENDOFPAGE | |
HTTP/1.1 200 OK | |
<html><head><script language="javascript"> | |
var url = location.hostname + ':' + (parseInt(location.port) + 1); |
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'); |