Skip to content

Instantly share code, notes, and snippets.

View nhalstead's full-sized avatar
👨‍💻
Something. Maybe cool

Noah Halstead nhalstead

👨‍💻
Something. Maybe cool
View GitHub Profile
@nhalstead
nhalstead / api-shorte.php
Last active June 10, 2017 01:27 — forked from dchomicz/api-test.php
Shorte.st Sample API File. Works with V1 of their API
<?php
if(!isset($authKey)) { $authKey = "YOUR KEY HERE"; }
if(!isset($longURL)) { $longURL = "http://join-shortest.com/ref/46cc802beb?user-type=new"; }
$storeShortLink = "linkout";
DEFINE("apiBaseAddress", "https://api.shorte.st/v1/data/url");
function formatURLPostData($url){ return "urlToShorten=".$url; }
function http_exist($url) {
if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { return "https://" . $url; }
else { return $url; }
@nhalstead
nhalstead / main.cpp
Created August 10, 2017 22:41 — forked from roger-/main.cpp
Part of RTSP server
/* ---------------------------------------------------------------------------
** This software is in the public domain, furnished "as is", without technical
** support, and with no warranty, express or implied, as to its usefulness for
** any purpose.
**
** main.cpp
**
** V4L2 RTSP streamer
**
** H264 capture using middleware_video
@nhalstead
nhalstead / proxy.php
Last active January 30, 2018 16:42 — forked from iovar/proxy.php
Simple PHP Proxy Script
<?php
/**
* Warning! Read and use at your own risk!
*
* This tiny proxy script is completely transparent and it passes
* all requests and headers without any checking of any kind.
* The same happens with JSON data. They are simply forwarded.
*
* This is just an easy and convenient solution for the AJAX
* cross-domain request issue, during development.
@nhalstead
nhalstead / array-to-texttable.php
Last active April 16, 2018 02:50 — forked from tony-landis/array-to-texttable.php
PHP: Array to Text Table Generation Class
<?php
/**
* Array to Text Table Generation Class
*
* @author Tony Landis <tony@tonylandis.com>
* @link http://www.tonylandis.com/
* @copyright Copyright (C) 2006-2009 Tony Landis
* @license http://www.opensource.org/licenses/bsd-license.php
*/
@nhalstead
nhalstead / status_page.html
Last active June 21, 2019 05:45 — forked from eeejay/hosting_good.html
Simple Status Page that has auto Reload and fully controlled by a Meta Tag.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Server Status Page</title>
<meta property="status" content='{"api":"//example.com/server_status.php?format=json","interval":60,"expand":true,"servers":[{"id":12,"short":"Strawberry","online":true,"error":true,"hostname":"nhalstead.me","statusPageLink":false,"serialNumber":"0000","location":{"building":"X","rack":13,"unit":40}}]}'>
<style>
a:hover, a:focus, a:active {
text-decoration: none;
color: inherit;
@nhalstead
nhalstead / LockColumns.php
Created January 21, 2020 04:52 — forked from nullthoughts/LockColumns.php
Lock columns/attributes from updates in Laravel
<?php
namespace App\Traits;
trait LockColumns
{
/**
* Cast locked_columns as a JSON column
*
* @return void
@nhalstead
nhalstead / README.md
Created December 1, 2020 16:38 — forked from astamicu/Remove videos from Youtube Watch Later playlist.md
Script to remove all videos from Youtube Watch Later playlist

UPDATE 17.10.2019

Only works on old youtube skin.

//added "&disable_polymer=true" after playlist link

Also, saw this now, there is a "remove watched" button.

  1. Open your watch later playlist on youtube.
  2. Open the development console for your browser ( Ctrl+Shift+J for chrome, Ctrl+Shift+K for firefox )
@nhalstead
nhalstead / ConfirmByPassword.php
Created March 12, 2022 04:39 — forked from DarkGhostHunter/ConfirmByPassword.php
Confirms an action with a password
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Lang;
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
html {
@nhalstead
nhalstead / anonymous_google_profile_images.md
Created September 6, 2023 19:05 — forked from hmnd/anonymous_google_profile_images.md
Definitive list of anonymous Google Profile Images