Skip to content

Instantly share code, notes, and snippets.

View winfamy's full-sized avatar

Grady Phillips winfamy

View GitHub Profile
@winfamy
winfamy / keybase.md
Created November 10, 2016 06:15
keybase.md

Keybase proof

I hereby claim:

  • I am winfamy on github.
  • I am infamy (https://keybase.io/infamy) on keybase.
  • I have a public key ASALc4VmpLI-GMCV5PFvQXf0lMUscxbsywi9aIA87n84nAo

To claim this, I am signing this object:

@winfamy
winfamy / regex
Created February 28, 2017 16:25
Rankings Regex
<TR ALIGN=CENTER><TD BGCOLOR="#[A-z0-9]+?" ROWSPAN=2>([A-z]+?-[0-9]+?)<\/TD><TD BGCOLOR="#[A-z0-9]+?" ROWSPAN=2>((\d+?)-(\d+?) ([R|B])|&nbsp;)<\/TD><TD BGCOLOR="#[A-z0-9]+?">(\d+?\*?)<\/TD><TD BGCOLOR="#[A-z0-9]+?">(\d+?\*?)<\/TD><\/TR><TR ALIGN=CENTER><TD BGCOLOR="#[A-z0-9]+?">(\d+?\*?)<\/TD><TD BGCOLOR="#[A-z0-9]+?">(\d+?\*?)<\/TD><\/TR>
<?php
include 'dbc.php';
$file = basename(__FILE__);
if ( eregi($file, $_SERVER['REQUEST_URI']) ) {
die("Sorry but you cannot access this file directly for security reasons.");
}
$err = array();
foreach($_GET as $key => $value) {
@winfamy
winfamy / jb.php
Last active March 20, 2018 14:03
php jelly beans
<? session_start(); ?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jellybean Game</title>
</head>
<body>
<?php
@winfamy
winfamy / mod.js
Last active September 6, 2018 15:08
Modulo Solutions (JS)
function modBySubtract(num, modBy) {
// floor truncates a decimal on a double
// num/modBy = 20/3 = 6.6667
// floor(num/modBy) = 6
// so we're finding the total full count of modBy within num
// then subtracting to find the remainder
// will throw a divideByZero runtime error if modBy = 0
let fullAmountCount = Math.floor(num/modBy)
return num - modBy*fullAmountCount
}
areTradeSettingsValid: (cookie) => {
// Settings to check
// https://www.roblox.com/my/settings/json IsAnyBC true
// https://accountsettings.roblox.com/v1/inventory-privacy AllUsers
// https://accountsettings.roblox.com/v1/trade-value None
// https://accountsettings.roblox.com/v1/trade-privacy All
return new Promise((resolve, reject) => {
const end = (b, key) => {
passedChecks[key] = b
@winfamy
winfamy / toasts.js
Created May 20, 2019 01:37
Spread operators are OP af
import toasts from 'izitoast'
const defaultTheme = {
theme: 'dark',
color: '#77848e',
backgroundColor: '#2a2e31',
progressBarColor: '#20c05c',
timeout: 2000,
transitionIn: 'bounceInUp',
transitionOut: 'fadeOutDown'
<?php
$curl = curl_init('https://api.ipify.org?format=json');
curl_setopt($curl, CURLOPT_PROXY, 'http://zproxy.lum-superproxy.io:22225');
curl_setopt($curl, CURLOPT_PROXYUSERPWD, 'lum-customer-hl_f70b9d11-zone-zone1:pass');
curl_exec($curl);
?>
#!/bin/bash
set -u # raise error for uninitialized variables
export PGHOST="127.0.0.1"
export PGUSER="student"
export PGPASSWORD="CompSci364"
if which colordiff > /dev/null; then
# redefine `diff` as `colordiff` (if available)
diff() {
#!/bin/bash
set -u # raise error for uninitialized variables
export PGHOST="127.0.0.1"
export PGUSER="student"
export PGPASSWORD="CompSci364"
if which colordiff > /dev/null; then
# redefine `diff` as `colordiff` (if available)
diff() {