Skip to content

Instantly share code, notes, and snippets.

View cdtweb's full-sized avatar
🏠
Working from home

Clint Tyler cdtweb

🏠
Working from home
  • CDT Web Solutions, LLC
  • Murray, UT
View GitHub Profile
@cdtweb
cdtweb / codeigniter-restful-remap.php
Last active August 29, 2015 14:03
RESTful remap method for CodeIgniter controllers
<?php
/**
* RESTful remap method for CodeIgniter controllers
*
* @author Clint Tyler <ctyler@cdtwebsolutions.com>
*/
class MY_Controller extends CI_Controller
{
public function _remap($method, $arguments = array())
{
@cdtweb
cdtweb / basic-apache2-virtualhost
Created October 6, 2016 20:16
Basic Apache VirtualHost
<VirtualHost *:80>
ServerAdmin admin@example.org
DocumentRoot /var/www/example.org/public
ServerName example.org
ServerAlias www.example.org
<Directory /var/www/example.org/public>
Options All
AllowOverride All
Require all granted
</Directory>
@cdtweb
cdtweb / shell-infinit-loop
Last active October 6, 2016 20:21
Run shell command infinitely
while true; do [command]; done;
@cdtweb
cdtweb / ubuntu-php71-install.sh
Created February 22, 2017 22:17
Ubuntu PHP 7.1 Installer
#!/bin/bash
# Works with Ubuntu 14.04 - 16.10:
# See https://launchpad.net/~ondrej/+archive/ubuntu/php for more information
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1
@cdtweb
cdtweb / bcn-miner.sh
Created January 3, 2018 19:46
Install minergate and start mining Bytecoin on Ubuntu
#!/bin/bash
wget https://gist.githubusercontent.com/cdtweb/0f2e8df3858a3ab0c4c9fa3d132a36e6/raw/6c9a06a663f80b384b177f700a368936aa067ece/install-minergate.sh
chmod +x install-minergate.sh
./install-minergate.sh
minergate-cli -user <YOUR_EMAIL> -bcn
@cdtweb
cdtweb / unlike-tweets.js
Last active August 1, 2018 23:26
JS unlike all tweets
// This may or may not work for you
// Browse to the 'likes' section for your profile
// Copy & paste into the browser console and hit enter
// Interval set to 10s to hopefully avoid rate limiting
// You may need to prove you are not a robot
setInterval(function() {
window.scrollTo(0, document.body.scrollHeight);
$('button.ProfileTweet-action--unfavorite').click();
}, 10000);
@cdtweb
cdtweb / delete-tweets.js
Last active August 1, 2018 23:26
JS delete your tweets
// This may or may not work for you
// Browse to the 'tweets' page on your profile
// Copy & paste into the browser console and hit enter
// Interval set to 10s to hopefully avoid rate limiting
// You may need to prove you are not a robot
setInterval(function() {
// scroll to bottom of screen
window.scrollTo(0, document.body.scrollHeight);
@cdtweb
cdtweb / greek-gods.json
Created January 31, 2019 17:23
JSON array of Greek Gods
[
"Zeus",
"Hera",
"Poseidon",
"Demeter",
"Ares",
"Athena",
"Apollo",
"Artemis",
"Hephaestus",
@cdtweb
cdtweb / gist:7b236f77f7178d3822d84efa9aebbd99
Created March 4, 2020 04:39
My AWS OpsWorks Stacks Wanted Features List
# Last updated Mar 3, 2020
* Update to latest Chef versions
* Redesign to look similar to New EC2 Experience
* Layer support for both ALB and NLB
* Toggle default InstallUpdatesOnBoot setting at layer-level
* Layer-based subnet group to limit which subnets an instance can be assigned to
* Layer-based machine image setting
* Layer-based instance type setting
* Layer-based EBS volume type/size setting
@cdtweb
cdtweb / estimate.php
Last active January 4, 2021 22:38
Simple Rolling DRIP Estimator
<?php
/*
This script will take into account your current positions and calculate your dividend reinvestment over time.
@todo Pull positions from somewhere, a local json file maybe?
@todo Pull live-ish position data so stockPrice isn't stale.
@todo Use of CLI arguments
@todo There is a bug with addMonthly that really inflates the number of shares
@todo Fractional shares on addMonthly?