Skip to content

Instantly share code, notes, and snippets.

@bateller
bateller / Doxyfile
Created November 21, 2019 15:15 — forked from ugovaretto/Doxyfile
Doxygen sample configuration file to extract everything
# Doxyfile 1.8.7
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
#
# All text after a double hash (##) is considered a comment and is placed in
# front of the TAG it is preceding.
#
# All text after a single hash (#) is considered a comment and will be ignored.
# The format is:
@bateller
bateller / create_ami.sh
Created October 23, 2019 14:15
Create AMIs + Launch Configurations for non aws-cli experts for use in AutoScaling Groups
#!/bin/sh
#
# Copyright: 2017-2019 - B. Teller
# Created by: Brian Teller
# Description: Help non-shell or AWS experts create easy + quick AMIs for use within AutoScaling Groups
#
upSeconds="$(tail /proc/uptime | grep -o '^[0-9]\+')"
upMins=$((upSeconds / 60))

Keybase proof

I hereby claim:

  • I am bateller on github.
  • I am bateller (https://keybase.io/bateller) on keybase.
  • I have a public key ASD_CZiSpt7scDRrzMAofzVKz3yvOcOh9zEDUlg4e26Efgo

To claim this, I am signing this object:

@bateller
bateller / FizzBuzz.php
Last active May 29, 2024 14:57
FizzBuzz solution in PHP
<?php
if (php_sapi_name() === 'cli') $lb = "\n";
else $lb = "<br />";
for ($i = 1; $i <= 100; $i++)
{
if ($i % 15 === 0) {
echo "FizzBuzz $lb";
}

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@bateller
bateller / README.md
Created April 15, 2017 01:33 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@bateller
bateller / transform-html5.php
Created August 12, 2016 13:13 — forked from bzerangue/transform-html5.php
PHP: XSLT Transformation to build HTML5 html output (use xhtml 1.0 strict as your settings in your XSLT stylesheet)
<?php
// Load the XML source
$xml = new DOMDocument;
$xml->load('XML_SOURCE_LINK_HERE');
// Load XSLT stylesheet
$xsl = new DOMDocument;
$xsl->load('XSL_STYLESHEET_PAGE_LINK_HERE');
@bateller
bateller / sms-for-free.md
Created July 28, 2016 21:18 — forked from coolaj86/sms-for-free.md
Send text messages for free via email via xminder cell phone carrier lookup
@bateller
bateller / crontab
Created May 11, 2016 14:09 — forked from tovbinm/crontab
Logrotate & upload nginx logfiles to s3://bucket/dt=..../hostname.log...gz
# Nginx - logrotate & upload to S3
0 0 * * * /usr/sbin/logrotate /etc/logrotate.d/nginx
15 0 * * * s3cmd put /var/log/nginx/access.log-`date +"\%Y\%m\%d"`.gz s3://$LOGS_BUCKET_NAME/nginx-access/`date +"dt=\%Y\%m\%d"`/`hostname -s`.access.log-`date +"\%Y\%m\%d"`.gz
@bateller
bateller / index.html
Created January 12, 2016 12:20 — forked from 1forh/index.html
Prevent map zoom on scroll
<div id="map_wrapper">
<iframe id="map_canvas"></iframe>
</div>