Skip to content

Instantly share code, notes, and snippets.

View cbanowsky's full-sized avatar

Cameron Banowsky cbanowsky

  • HÅÇK ÇD
  • United States
View GitHub Profile
#!/bin/bash
sudo killall -HUP mDNSResponder;say DNS cache has been flushed
@cbanowsky
cbanowsky / package.json
Created August 4, 2017 16:42
Non-Functioning Package.json...any help?
{
"name": "smsGateway",
"description": "SMS Gateway service",
"version": "0.2.1",
"homepage": "http://blog.hack.cd",
"author": "Cameron Banowsky <cameron@hack.cd>",
"organization": "Envisability",
"repository": {
"type": "git",
"url": "https://github.com/Envisability/node-sms-gateway"
@cbanowsky
cbanowsky / gradient-bubbles-on-canvas.markdown
Created July 24, 2017 01:56
Gradient Bubbles on Canvas
@cbanowsky
cbanowsky / >> .bashrc
Last active June 2, 2018 16:41
Virus check a file using the command line and VirusTotal
tansfercheck() {
if [ $# -eq 0 ];
then echo -e "No arguments specified. Usage:\n transfercheck /tmp/test.md\ncat /tmp/test.md | transfercheck test.md";
return 1;
fi
# write to output to tmpfile for progress bar
tmpfile=$( mktemp -t transferXXX)
if tty -s;
then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g');
curl -X PUT --progress-bar --upload-file $1 https://transfer.sh/$basefile/virustotal >> $tmpfile;
@cbanowsky
cbanowsky / myip
Created March 14, 2017 11:52
cli script to get public ip
##!/bin/usr/bash
curl ipinfo.io/ip
exit;
@cbanowsky
cbanowsky / torgrabber.sh
Last active March 7, 2017 17:32
Clean, download, prepare, compile and install Tor 2.9.10 on Ubuntu -- Down and Dirty. Updated ...
#!/bin/bash
echo "Purging old installation of Tor"
sleep 5
apt-get purge tor* -y
wait
@cbanowsky
cbanowsky / i don't even know why
Created May 15, 2015 00:34
Implemented this variation in a project today, and it was interesting
createCode: function (amount, currency, password) {
var deferred = $q.defer();
var self = this;
var id = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for( var i=0; i < 8; i++ )
id += possible.charAt(Math.floor(Math.random() * possible.length));
if (!password || password == '')
password = id;
@cbanowsky
cbanowsky / index.js
Created April 16, 2015 18:24
express server
var express = require('express'),
path = require('path'),
http = require('http'),
app = module.exports = express(),
port = process.env.PORT || 3000,
engines = require('consolidate');
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '../../client/chips ');
app.engine('html', engines.underscore);
@cbanowsky
cbanowsky / gist:77e7570e4d03c5a18cf2
Created April 4, 2015 19:48
Koding Bash Script to install RVM
#!/usr/bin/env bash
shopt -s extglob
set -o errtrace
set -o errexit
@cbanowsky
cbanowsky / matrix.sh
Created May 22, 2014 20:03
Matrix shell script....
#!/bin/bash
echo -e "\033[2J\033[?25l"; R=`tput lines` C=`tput cols`;: $[R--] ; while true
do ( e=echo\ -e s=sleep j=$[RANDOM%C] d=$[RANDOM%R];for i in `eval $e {1..$R}`;
do c=`printf '\\\\0%o' $[RANDOM%57+33]`
$e "\033[$[i-1];${j}H\033[32m$c\033[$i;${j}H\033[37m"$c; $s 0.1;if [ $i -ge $d ]
then $e "\033[$[i-d];${j}H ";fi;done;for i in `eval $e {$[i-d]..$R}`; #[mat!rix]
do echo -e "\033[$i;${j}f ";$s 0.1;done)& sleep 0.05;done