Skip to content

Instantly share code, notes, and snippets.

View jongalloway's full-sized avatar

Jon Galloway jongalloway

View GitHub Profile
@jongalloway
jongalloway / starcounter.js
Last active January 11, 2023 20:15 — forked from yyx990803/starcounter.js
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
public class CurrentTimeGetter
{
private volatile Holder _holder;
const String rfc1123Pattern = "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'";
public string GetCurrentTimeAsString()
{
DateTime now = DateTime.UtcNow;
Holder currentHolder = _holder;
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
uint viewIndex = 0;
uint.TryParse(Request.QueryString["view"], out viewIndex);
views.ActiveViewIndex = (int)(viewIndex < views.Views.Count ? viewIndex : 0);
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
uint viewIndex = 0;
uint.TryParse(Request.QueryString["view"], out viewIndex);
views.ActiveViewIndex = (int)(viewIndex < views.Views.Count ? viewIndex : 0);
@jongalloway
jongalloway / Default.aspx
Last active December 21, 2015 04:09 — forked from DamianEdwards/Default.aspx
Fixed some obvious problems
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="System.Threading" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
uint viewIndex = 0;
uint.TryParse(Request.QueryString["view"], out viewIndex);
views.ActiveViewIndex = (int)(viewIndex < views.Views.Count ? viewIndex : 0);
@jongalloway
jongalloway / start480x800.1024.bat
Last active December 10, 2015 00:29
Generalized using %ProgramFiles(x86)% and %LOCALAPPDATA% so this will work on anyone's computer.
@echo off
"%ProgramFiles(x86)%\Microsoft XDE\8.0\xde.exe" -createDiffDisk "%LOCALAPPDATA%\Microsoft\XDE\dd.480x800.1024.vhd" -vhd "%ProgramFiles(x86)%\Microsoft SDKs\Windows Phone\v8.0\Emulation\Images\Flash.480x800.vhd" -name "Emulator WVGA" -memsize 1024
@jongalloway
jongalloway / download-entries.ps1
Created November 29, 2011 21:38 — forked from mattpodwysocki/download-entries.ps1
Download entries from NuGet
# --- settings ---
$feedUrlBase = "http://go.microsoft.com/fwlink/?LinkID=206669"
# the rest will be params when converting to funclet
$latest = $true
$overwrite = $false
$top = 5000 #use $top = $null to grab all
$destinationDirectory = join-path ([Environment]::GetFolderPath("MyDocuments")) "NuGetLocal"
# --- locals ---
$webClient = New-Object System.Net.WebClient
using System;
using System.Diagnostics;
using System.Net;
namespace ConsoleApplication1 {
internal class Program {
private const int COUNT = 20;
private static void Main() {
var urls = new[] {
@jongalloway
jongalloway / Channel9Downloader.ps1
Last active September 14, 2022 12:50 — forked from DerAlbertCom/Channel9Downloader.ps1
PowerShell Scripts for Downloading Channel 9 Videos
<#PSScriptInfo
.VERSION 1.3
.AUTHOR jongalloway@gmail.com
.GUID da220b4e-e889-42dc-85cd-91e0f91a965e
.PROJECTURI https://gist.github.com/jongalloway/935780
.RELEASENOTES
1.2 adds regular expression title match (thanks, @meavk)
1.3 adds check for / at end of RSS URL
#>