Skip to content

Instantly share code, notes, and snippets.

View ChrisHammond's full-sized avatar
💭
Learning new things

Chris Hammond ChrisHammond

💭
Learning new things
View GitHub Profile
@ChrisHammond
ChrisHammond / update_github_io_repos.ps1
Last active August 5, 2024 17:00
Update GitHub Repos and Jekyll GEMFILE/Bundles
# This GIST goes along with a blog post at ChrisHammond.com https://www.chrishammond.com/blog/itemid/3201/using-powershell-and-windows-subsystem-for-linux-t
# Define the path to the file containing the list of repositories
$reposListPath = "YOURPATHHERE\github_io_repos.txt"
# sample github_io_repos.txt file
# YOURDRIVE:\Projects\reponame.github.io
# YOURDRIVE:\Projects\reponame2.github.io
# Read the list of repositories
$repos = Get-Content -Path $reposListPath
@ChrisHammond
ChrisHammond / LatestForumPosts.txt
Created May 17, 2024 20:41
This is a CommunityServer enhancement for latest forum posts from a blog post from 2004
<%@ Control %>
<%@ Import namespace="CommunityServer.Discussions.Components" %>
<%@ Import namespace="CommunityServer.Components" %>
<%@ Import namespace="System.Data.SqlTypes" %>
<script language="C#" runat="server">
//This control was originally based on a blog post by Christian Nordbakk you can find it at the URL below.
//http://www.windowsadvice.com/blogs/cnordbakk/archive/2005/03/28/Latest_Forum_Posts_UserControl.aspx
//You are free to do with this code what you wish. If you wish to credit me you can link to my blog at
//http://www.chrishammond.com/
@ChrisHammond
ChrisHammond / gist:3925206b7bc7177c8b27a01a53257aa1
Created November 12, 2018 04:36
DNN Core Forums to Active Forums migration instructions
Documenting the instructions for migrating from the DNN Core 5.0.3 module to Active Forums 5.0.
2018 Notes
These instructions were originally written by myself (Chris Hammond) in 2012 and posted in the Codeplex Wiki, with the deprecation of Codeplex they were lost and are being reincarnated in this GIST.
Active Forums is on V6, can you migrate to that? Possible, but I haven't tried.
Instructions for use
Always test on a copy of your production site before using in production, you've been warned
@ChrisHammond
ChrisHammond / gist:31ae2e279aa03d3b3326f7b91912a7c3
Created June 5, 2018 17:27
DNN Razor script for Flickr Group Stream
<script type="text/javascript">
$.getJSON("https://api.flickr.com/services/feeds/groups_pool.gne?jsoncallback=?",
{
lang: "en-us",
id: "1751534@N22", //CHANGE HERE
format: "json"
}, displayImages);
function displayImages(data) {
@ChrisHammond
ChrisHammond / GoPro TimeLapse Renaming
Last active April 2, 2018 05:26
This file is one I put together for working on compiling multiple GoPro folders/files into one collection for creating a timelapse
#This file is one I put together for working on compiling multiple GoPro folders/files into one collection for creating a timelapse
# Copy all files from the current directory/subfolders into the root of the current directory
get-Childitem -recurse -filter *.jpg | Move-Item
#Rename all the files starting at 1 (can't get this to work properly with date sort)
$i = 1
>> Get-ChildItem *.jpg | %{Rename-Item $_ -NewName ('G0{0:D6}.jpg' -f $i++)}
@ChrisHammond
ChrisHammond / MSBuild.Community.Tasks.Targets
Created August 14, 2014 23:28
Automating DNN Module Packaging
<?xml version="1.0" encoding="windows-1252" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)' == ''">$(MSBuildProjectDirectory)\BuildScripts</MSBuildCommunityTasksPath>
<MSBuildDnnBinPath Condition="'$(MSBuildDnnBinPath)' == ''">$(MSBuildProjectDirectory)\..\..\bin</MSBuildDnnBinPath>
<MSBuildCommunityTasksLib>$(SolutionDir)\packages\MSBuildTasks.1.4.0.74\tools\MSBuild.Community.Tasks.dll</MSBuildCommunityTasksLib>
</PropertyGroup>
<UsingTask AssemblyFile="$(MSBuildCommunityTasksLib)" TaskName="MSBuild.Community.Tasks.AspNet.InstallAspNet" />
<UsingTask AssemblyFile="$(MSBuildCommunityTasksLib)" TaskName="MSBuild.Community.Tasks.AssemblyInfo" />
<UsingTask AssemblyFile="$(MSBuildCommunityTasksLib)" TaskName="MSBuild.Community.Tasks.Attrib" />
@ChrisHammond
ChrisHammond / CodeExamples-3392
Created May 31, 2012 21:02
Adding a website link to the Member Profile and Directory in DotNetNuke 6.2
<-- Display some basic member info -->
<div class="pBio">
<h3 data-bind="text: AboutMeText"></h3>
<p data-bind="html: Biography"></p>
</div>
<div class="pAddress">
<h3 data-bind="text: LocationText"></h3>
<p> <span data-bind="text: Location()"></span><span data-bind="visible: Location().length > 0"><br/></span>
<span data-bind="text: Country()"></span><span data-bind="visible: Country().length > 0"><br/></span>
</p>
@ChrisHammond
ChrisHammond / NetduinoGo-4-RGBLED-Flash-Sequence.cs
Created April 19, 2012 06:28
Flashing 4 RGB Led Modules on a Netduino Go! in sequence
/*
* Project References include GoBux, Microsoft.SPOT.Graphics, Microsoft.SPOT.Native, mscorlib, NetduinoGo.Button, NetduinoGo.Potentiometer, NetduinoGo.RgbLed
* This code takes 6 different Netduino Go! Modules and flashes 4 LED RGBs based on the potentiometer.
* You can find the video sample for this at http://www.youtube.com/watch?v=EH6uc324aY8
*
* Feel free to modify/fork this code, no attribution necessary, but it would be appreciated.
* Chris Hammond (http://www.chrishammond.com) @christoc
*/
@ChrisHammond
ChrisHammond / NetduinoGo-RGBLED-Flash.cs
Created April 19, 2012 05:46
This code takes 4 different Netduino Go! Modules and flashes 3 LED RGBs based on the potentiometer. For a full description visit the blog post at * http://www.chrishammond.com/blog/itemid/2499/simple-netduino-go-tutorial-flashing-rgb-leds-with.aspx
/*
* Project References include GoBux, Microsoft.SPOT.Graphics, Microsoft.SPOT.Native, mscorlib, NetduinoGo.Button, NetduinoGo.Potentiometer, NetduinoGo.RgbLed
* This code takes 4 different Netduino Go! Modules and flashes 3 LED RGBs based on the potentiometer. For a full description visit the blog post at
* http://www.chrishammond.com/blog/itemid/2499/simple-netduino-go-tutorial-flashing-rgb-leds-with.aspx
*
* Feel free to modify/fork this code, no attribution necessary, but it would be appreciated.
* Chris Hammond (http://www.chrishammond.com) @christoc
*/
using NetduinoGo;