Skip to content

Instantly share code, notes, and snippets.

View kevinoconnor7's full-sized avatar

Kevin O'Connor kevinoconnor7

View GitHub Profile
@kevinoconnor7
kevinoconnor7 / bootstrap.css
Created August 14, 2013 19:50
Bootstrap themed request tracker
@import url(http://fonts.googleapis.com/css?family=Titillium+Web:200);
/* ===[ Page ]=== */
body { background: #ccc url(/NoAuth/images/custbg.png) repeat }
/* ===[ Page title ]=== */
div#header h1 {
margin-top: 0px;
font-family: 'Titillium Web', sans-serif;
font-weight: 200;
font-size: 1.8em;
@kevinoconnor7
kevinoconnor7 / authelia.sh
Last active March 17, 2024 15:09
Home Assistant Command Line Authentication for Authelia
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
## BEGIN CONFIGURATION SECTION ##
# The domain/path of your authelia service. For example:
# - sso.example.com
# - example.com/auth
# - example.com:8443
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py
index 0f2c06f40..77ffa7789 100644
--- a/youtube_dl/downloader/hls.py
+++ b/youtube_dl/downloader/hls.py
@@ -138,6 +138,9 @@ class HlsFD(FragmentFD):
else compat_urlparse.urljoin(man_url, line))
if extra_query:
frag_url = update_url_query(frag_url, extra_query)
+ if '_ad/creative/' in frag_url:
+ self.to_screen('[AD!] Found ad url: %s' % frag_url)
@kevinoconnor7
kevinoconnor7 / c-ddns.sh
Last active November 24, 2020 11:07
CloudFlare Dynamic DNS
#!/bin/sh
WAN_IP=`curl ifconfig.io/ip`
OLD_WAN_IP=`cat /var/CURRENT_WAN_IP.txt`
if [ "$WAN_IP" = "$OLD_WAN_IP" ]
then
echo "IP Unchanged"
else
curl https://www.cloudflare.com/api_json.html \
-d 'a=rec_edit' \
-d 'tkn=8afbe6dea02407989af4dd4c97bb6e25' \
@kevinoconnor7
kevinoconnor7 / scrip.pl
Created August 14, 2013 20:44
Map a user's OU to RT queue
# LDAP address
my $ldap_address = ""
# LDAP base DN path
my $ldap_base_dn = ""
# LDAP user to connect with
my $ldap_user_path = ""
# LDAP user password to connect with

Keybase proof

I hereby claim:

  • I am kevinoconnor7 on github.
  • I am kevin (https://keybase.io/kevin) on keybase.
  • I have a public key whose fingerprint is B66F 8F8C B281 8C18 91AA C351 4701 2E48 8251 7B3F

To claim this, I am signing this object:

@kevinoconnor7
kevinoconnor7 / advancedUsage.html
Last active December 16, 2015 12:09
Advanced usage of my Bootstrap Pagedown jQuery plugin
<!-- Le script -->
<script type="text/javascript" src="js/jquery.pagedown-bootstrap.combined.min.js"></script>
<!-- Le CSS -->
<link href="css/jquery.pagedown-bootstrap.css" rel="stylesheet">
<!-- Le lift -->
<script type="text/javascript">
$("textarea#pagedownMeDangerously").pagedownBootstrap({
'sanatize': false,
@kevinoconnor7
kevinoconnor7 / usage.html
Last active December 16, 2015 12:08
Basic usage of my Bootstrap Pagedown plugin
<!-- Le script -->
<script type="text/javascript" src="js/jquery.pagedown-bootstrap.combined.min.js"></script>
<!-- Le CSS -->
<link href="css/jquery.pagedown-bootstrap.css" rel="stylesheet">
<!-- Le lift -->
<script type="text/javascript">
(function () {
javascript:void((function(){$(".thing .arrow.down").click()})());
@kevinoconnor7
kevinoconnor7 / gist:4178981
Created November 30, 2012 21:57
Proxy code
/**
@file proxy.cpp
@brief Top level proxy implementation file
*/
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdlib.h>