Skip to content

Instantly share code, notes, and snippets.

View anthonysomerset's full-sized avatar

Anthony Somerset anthonysomerset

View GitHub Profile
@anthonysomerset
anthonysomerset / gist:b83f5f8b732f4a4102c333d100337f90
Created September 29, 2022 07:28
Preseed default iPXE - AUTOINSTALL
#!gpxe
<%#
kind: iPXE
name: Preseed default iPXE - AUTOINSTALL
model: ProvisioningTemplate
oses:
- Ubuntu
test_on:
- ubuntu4dhcp
description: |
@anthonysomerset
anthonysomerset / gist:1c49728a10130f22df55f9872f2a9274
Created April 12, 2016 13:28
foreman provisioning failures
Ubuntu 14.04 - working
default linux
label linux
kernel boot/Ubuntu-14.04-x86_64-linux
append initrd=boot/Ubuntu-14.04-x86_64-initrd.gz interface=auto netcfg/disable_dhcp=true netcfg/confirm_static=true netcfg/get_ipaddress=x.x.x.x netcfg/get_netmask=255.255.255.192 netcfg/get_gateway=x.x.x.x netcfg/get_nameservers=5.11.11.5 5.11.11.11 hostname=<hostname> domain=<domain> url=http://puppet.<domain>:80/unattended/provision?token=<token>&static=yes ramdisk_size=10800 root=/dev/rd/0 rw auto console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us locale=en_US
IPAPPEND 2
Ubuntu 16.04 - Failing
{
"description": "The CodeIgniter framework",
"name": "codeigniter/framework",
"type": "project",
"homepage": "http://codeigniter.com",
"license": "MIT",
"support": {
"forum": "http://forum.codeigniter.com/",
"wiki": "https://github.com/bcit-ci/CodeIgniter/wiki",
"irc": "irc://irc.freenode.net/codeigniter",
@anthonysomerset
anthonysomerset / apache .htaccess
Created March 2, 2013 16:50
Hostbill downloads folder lockdown to prevent public access to your SQL backups in /downloads (and thus your clients information)
#create or update the .htaccess file inside /downloads to prevent information leakage of client data
deny from all
Options -Indexes
After searching for the appropriate software esp (FREEwares), the internet at times seems to disapoint. Most software programmes are paid for or the free version comes with a trial period only.
The best way is just to pay for the right software that you want and you will not stress out but if you still want it for free.For most Zimbabweans, the software is quiet affordable but due to some problems or lack of payment systems online, there are many ways out there.
On the currently available payment systems i Zimbabwe please read this part.
One place you can get almost anything is through torrents!
This is a Distributed file sharing system which enables downloads from various computers simultaneously and it has the advantage of improved speeds. For one to be able to download files using torrents you need to install an application called Torrent Client that enables you to get data from various links on the internet. uTorrent, Vuze Bittorrent and Swarm Torrent client are examples of the Torrent Client Software.
Th
After searching for the appropriate software esp (FREEwares), the internet at times seems to disapoint. Most software programmes are paid for or the free version comes with a trial period only.
The best way is just to pay for the right software that you want and you will not stress out but if you still want it for free.For most Zimbabweans, the software is quiet affordable but due to some problems or lack of payment systems online, there are many ways out there.
On the currently available payment systems i Zimbabwe please read this part.
One place you can get almost anything is through torrents!
This is a Distributed file sharing system which enables downloads from various computers simultaneously and it has the advantage of improved speeds. For one to be able to download files using torrents you need to install an application called Torrent Client that enables you to get data from various links on the internet. uTorrent, Vuze Bittorrent and Swarm Torrent client are examples of the Torrent Client Software.
Th
root@test1:~# apt-get update
Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Ign http://security.debian.org/ squeeze/updates/main Translation-en_US
Get:2 http://mirrors.kernel.org squeeze Release.gpg [1,672 B]
Ign http://mirrors.kernel.org/debian/ squeeze/main Translation-en
Ign http://mirrors.kernel.org/debian/ squeeze/main Translation-en_US
Get:3 http://mirrors.kernel.org squeeze-updates Release.gpg [836 B]
Ign http://mirrors.kernel.org/debian/ squeeze-updates/main Translation-en
Ign http://mirrors.kernel.org/debian/ squeeze-updates/main Translation-en_US
dd bs=1M count=512 if=/dev/zero of=testds conv=fdatasync
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 10.1862 s, 52.7 MB/s
hdparm -tT /dev/xvda1
/dev/xvda1:
Timing cached reads: 13090 MB in 1.99 seconds = 6586.22 MB/sec
Timing buffered disk reads: 142 MB in 3.03 seconds = 46.93 MB/sec
@anthonysomerset
anthonysomerset / gist:3654655
Created September 6, 2012 10:39
apc clear cache - for apc.stat=0
<?php
if ($_GET['token'] != 'somesecretpass') {
header("HTTP/1.0 404 Not Found");
exit;
}
apc_clear_cache();
apc_clear_cache('opcode');
echo json_encode(array('success' => true));
@anthonysomerset
anthonysomerset / custom-sirportly-wp.php
Created March 29, 2012 13:09
WP function for gravity forms to allow the submission of a gravityform to sirportly via the remote forms feature
<?php
//edit this to match the form id matching the form you want to post to sirportly for me it was form_id 3
add_action("gform_post_submission_3", "post_to_sirportly", 10, 2);
function post_to_sirportly($entry, $form){
//numbers in here should match the field ID's in your gravity form
$post_data['name'] = $entry["1"];
$post_data['email'] = $entry["2"];