This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$browser = new COM("InternetExplorer.Application"); | |
$browser->Fullscreen = true; | |
$handle = $browser->HWND; | |
$browser->Visible = true; | |
$browser->Navigate("http://staticfloat.com"); | |
/* Timeout? */ | |
while ($browser->Busy) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list | |
sudo apt update | |
sudo apt install mono-devel gtk-sharp2 libappindicator0.1-cil libmono-2.0-1 -y | |
sudo apt install apt-transport-https nano git-core software-properties-common dirmngr -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nixos config for camus thinkpad T430s Laptop | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxmox upgrade from 5.4 to 7 without CEPH | |
## 5to6 | |
systemctl stop pve-ha-lrm | |
systemctl stop pve-ha-crm | |
echo "deb http://download.proxmox.com/debian/corosync-3/ stretch main" > /etc/apt/sources.list.d/corosync3.list | |
apt update | |
apt dist-upgrade --download-only | |
apt dist-upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# uses gambling+porn from https://github.com/StevenBlack/hosts | |
# can be ran via cron | |
cd ~ | |
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts -O /tmp/hosts | |
sudo sed -i '/#DELETE/Q' /etc/hosts | |
echo '#DELETE' | sudo tee -a /etc/hosts | |
cat /tmp/hosts |sudo tee -a /etc/hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install under /etc/systemd/system/zabbix_agent2.service | |
[Unit] | |
Description=Zabbix Agent 2 | |
After=syslog.target | |
After=network.target | |
[Service] | |
Environment="CONFFILE=/etc/zabbix/zabbix_agentd.conf" | |
EnvironmentFile=-/etc/sysconfig/zabbix-agent | |
Type=simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# _ __ _ | |
# ((-)).--.((-)) | |
# / '' \ | |
# ( \______/ ) | |
# \ ( ) / | |
# / /~~~~~~~~\ \ | |
# /~~\/ / \ \/~~\ | |
# ( ( ( ) ) ) | |
# \ \ \ \ / / / / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// guessingGame.cpp: David Noelte | |
// Description: The player has to guess the secret number and he got 10 attempts | |
#include <iostream> | |
#include <time.h> | |
using namespace std; | |
int main() { | |
// initialize random seed | |
srand(time(NULL)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lan_net = "192.168.0.0/24" | |
int_if = "dc0" | |
ext_if1 = "fxp0" | |
ext_if2 = "fxp1" | |
ext_gw1 = "68.146.224.1" | |
ext_gw2 = "142.59.76.1" | |
# nat outgoing connections on each internet interface | |
match out on $ext_if1 from $lan_net nat-to ($ext_if1) | |
match out on $ext_if2 from $lan_net nat-to ($ext_if2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |