Skip to content

Instantly share code, notes, and snippets.

View roachadam's full-sized avatar
💀
sp00ky

roach roachadam

💀
sp00ky
View GitHub Profile
@roachadam
roachadam / GoogleQuestion.cs
Last active February 9, 2021 06:28
My solutions to a "Google" Coding Question: https://www.youtube.com/watch?v=uQdy914JRKQ
namespace GoogleQuestion
{
class Program
{
static void Main(string[] args)
{
// Solution one - cheap way
int[] arr = new[] { 9, 9, 9 };
@roachadam
roachadam / MyBBAuth.php
Created September 8, 2017 03:57
Verifies username/password combo for a MyBB user, and checks if they are in a specific group.
<?php
require_once('./db.php'); // Your pdo sql datbase file
if(!isset($_GET['username']) || !isset($_GET['password']))
die('null');
$user = $_GET['username'];
$pass = $_GET['password'];
// TABLENAME = Your mybb sql table name
$usr = $db->prepare("SELECT username FROM TABLENAME WHERE username=:u LIMIT 1");