Skip to content

Instantly share code, notes, and snippets.

Carlin Scott carlin-q-scott

Block or report user

Report or block carlin-q-scott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@carlin-q-scott
carlin-q-scott / gist:fbc4fa76b9e8fc5286101c1ef13e921b
Created Dec 10, 2019 — forked from Wysie/gist:03934b6a79a715772abd
Upload to Amazon S3 Instead of Server for Sendy Email Image Uploads
View gist:fbc4fa76b9e8fc5286101c1ef13e921b
//Using S3.php from https://github.com/tpyo/amazon-s3-php-class. Place it in includes/helpers
//Replaces Sendy's includes/create/upload.php
<?php
include('../functions.php');
include('../login/auth.php');
require_once('../helpers/S3.php');
//Init
$file = $_FILES['file']['tmp_name'];
@carlin-q-scott
carlin-q-scott / save_facebook_group_photos.rb
Created Nov 11, 2019
Save Facebook group photos to Downloads folder using Firefox and Selenium WebDriver
View save_facebook_group_photos.rb
# This script will download all the photos owned by a group from Facebook.
require 'json'
require 'selenium-webdriver'
if ARGV.length != 3
print "please provide all the command arguments: {facebook group id} {first photo to download, often '1'} {last photo to download}"
exit 1
end
@carlin-q-scott
carlin-q-scott / ReferenceResolverWithNames.cs
Last active Aug 7, 2019
A JSON.Net IReferenceResolver that resolves field references using a Name property if available, otherwise it uses an index
View ReferenceResolverWithNames.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Serialization;
namespace MyNewtonsoftExtensions
{
public class ReferenceResolverWithNames : IReferenceResolver
{
private readonly ReferenceCollection _collection = new ReferenceCollection();
@carlin-q-scott
carlin-q-scott / query.bat
Last active Jul 10, 2019
Retrieve campsite availability by month for US Federal campgrounds
View query.bat
curl "https://www.recreation.gov/api/camps/availability/campground/234485/month?start_date=2019-07-01T00"%"3A00"%"3A00.000Z" -H "Accept: application/json, text/plain, */*" --compressed
View CIDR4Domain.sh
whois `nslookup facebook.com | grep Address | cut -d$'\n' -f 2 | cut -d ' ' -f 2` | grep CIDR | grep -o
'[^ ]*$'
@carlin-q-scott
carlin-q-scott / Connect to OpenVPN.xml
Last active Mar 7, 2019
OpenVPN Connection Management
View Connect to OpenVPN.xml
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2018-12-20T17:30:53.9213074</Date>
<Author>Carlin Scott</Author>
<URI>https://gist.github.com/carlin-q-scott</URI>
</RegistrationInfo>
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
View list-additional-functions.js
/*
This function will list all of the functions on an HTML DOM Element that are non-standard.
temp0 is set by the Firefox Inspector when you right click on an element and choose "use in console";
You need to do that before running this script.
*/
var functionList = "";
var element = document.createElement('div');
for(var p in temp0){
@carlin-q-scott
carlin-q-scott / docker-relay.sh
Last active Nov 17, 2018 — forked from jwilson8767/install_WSL_docker.sh
Docker or Docker Toolbox for Windows and Windows Subsystem for Linux (aka Bash on Windows)
View docker-relay.sh
#!/bin/sh
exec socat UNIX-LISTEN:/var/run/docker.sock,fork,group=docker,umask=007 EXEC:"npiperelay.exe -ep -s //./pipe/docker_engine",nofork
@carlin-q-scott
carlin-q-scott / Enum.js
Created Oct 10, 2018
Attempt at creating an enum using Proxy and Class
View Enum.js
class Enum extends Proxy {
constructor(...names) {
let members = Object.create(null);
members.tryParse = name => {
if (!members[name]) {
throw new Error(`Unable to parse '${name}' as an Enum member.`);
}
return members[name];
};
@carlin-q-scott
carlin-q-scott / .travis.yml
Created Feb 9, 2017
travis-ci build for firefox add-ons
View .travis.yml
language: node_js
node_js:
- "stable"
env:
global:
- DISPLAY=:99.0
- FIREFOX_BIN=./firefox/firefox
- JPM_FIREFOX_BINARY=./firefox/firefox
You can’t perform that action at this time.