Skip to content

Instantly share code, notes, and snippets.

View sethwebster's full-sized avatar

Seth Webster sethwebster

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Amazon.S3.Transfer;
using System.Collections.Specialized;
using System.Configuration;
using Amazon.S3.Model;
using System.IO;
using Amazon.S3.Util;
// Run this on another thread since the signalr client doesn't like it
// when we spend a long time processing messages synchronously
Task.Factory.StartNew(() =>
{
string content = message.Content;
string name = message.User.Name;
// Ignore replies from self
if (name.Equals(Name, StringComparison.OrdinalIgnoreCase))
{
<service xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app" xml:base="https://wgccnuget.corp.intuit.net/api/v1/FeedService.svc/">
<workspace>
<atom:title>Default</atom:title>
</workspace>
</service>
var Packages = PackageRepo.GetAll()
.Where(p => !p.IsPrerelease)
.ToV1FeedPackageQuery(Configuration.SiteRoot);
@sethwebster
sethwebster / gist:1707024
Created January 30, 2012 21:53
S3 Upload Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Amazon.S3.Transfer;
using System.Collections.Specialized;
using System.Configuration;
using Amazon.S3.Model;
using System.IO;
using Amazon.S3.Util;
@sethwebster
sethwebster / FbPageInviteAll.js
Created November 30, 2013 13:22
*** NOTE: This is the non-minified version for reading. A minified, bookmarklet-ready version of this is here: https://gist.github.com/sethwebster/7719079 For Facebook Pages only, invite all friends to like page. At the time of this writing, this works. Facebook changes things up pretty frequently so YMMV. First, add this code as bookmarklet, th…
var popup = null;
var total = 0;
function inviteNext(currentIndex,list){
if (currentIndex<list.length) {
total++;
list[currentIndex].click();
currentIndex++;
setTimeout(function() { inviteNext(currentIndex,list); },100);
updateCount();
}
@sethwebster
sethwebster / FbPageInviteAllBookMarklet.js
Created November 30, 2013 13:26
For Facebook Pages only, invite all friends to like page. At the time of this writing, this works. Facebook changes things up pretty frequently so YMMV. First, add this code as bookmarklet, then, when inviting friends, scroll to the bottom of your list to ensure they're all loaded. Finally, click the bookmarklet. Viola, all friends invited.
javascript:function inviteNext(e,t){if(e<t.length){total++;t[e].click();e++;setTimeout(function(){inviteNext(e,t)},100);updateCount()}else{destroyPopup()}}function updateCount(){var e=document.getElementById("invite-all-count-sw");e.innerText=total+"/"+els.length}function createPopup(){var e=document.getElementsByTagName("head")[0];var t=document.getElementsByTagName("body")[0];var n=document.createElement("div");n.setAttribute("id","add-all-div-sw");n.setAttribute("style",'text-align:center;font-family:"lucida grande",tahoma,verdana,arial,sans-serif;padding:20px;width:25%;height;20%;border:2px solid #ccc;background-color:#fff;position:relative;margin:0 auto 0 auto');n.innerHTML='Inviting Everyone in the List...<span id="invite-all-count-sw">0</span> invited so far...';t.appendChild(n);popup=n}function destroyPopup(){popup.parentElement.removeChild(popup)}var popup=null;var total=0;var els=document.getElementsByClassName("uiButton _1sm");createPopup();inviteNext(0,els)
@sethwebster
sethwebster / update-authors.sh
Last active May 15, 2017 17:26
Script to rewrite a list of authors in git history
#!/bin/bash
#
# +-----------------------+
# | Update Authors Script |
# +-----------------------+-------------------------------------------------------------------------+
# | |
# | Updates wrong authors and maps them to the new Git authors |
# | |
### Keybase proof
I hereby claim:
* I am sethwebster on github.
* I am sethwebster (https://keybase.io/sethwebster) on keybase.
* I have a public key whose fingerprint is 1455 B70C 6E9D EACA DF22 1E58 FDE6 0C0B 581B 3A8A
To claim this, I am signing this object:
@sethwebster
sethwebster / GoDaddySSLHAProxy.md
Created December 29, 2015 21:29
Creating a PEM for HaProxy from GoDaddy SSL Certificate

GoDaddy SSL Certificates PEM Creation for HaProxy (Ubuntu 14.04)

1 Acquire your SSL Certificate

Generate your CSR This generates a unique private key, skip this if you already have one.

sudo openssl genrsa -out  etc/ssl/yourdomain.com/yourdomain.com.key 1024

Next generate your CSR (Certificate Signing Request), required by GoDaddy: