Skip to content

Instantly share code, notes, and snippets.

View JamesSkemp's full-sized avatar

James Skemp JamesSkemp

View GitHub Profile
@Adamsimsy
Adamsimsy / SwitchMasterToWeb-V7.config
Last active February 21, 2017 21:35
Revised #Sitecore7 SwitchMasterToWeb.config for Content Delivery to one available at http://sdn.sitecore.net/Reference/Sitecore%207/Scaling%20Guide.aspx . Some additional configuration was required to remove Master index configuration.
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<sites>
<site name="shell" set:content="web" />
<site name="modules_shell" set:content="web" />
<site name="testing">
<patch:delete />
</site>
</sites>
@Gimly
Gimly / Git-Import-SVN.ps1
Last active May 16, 2023 23:59
Import a SVN repository into a Git repository, complete with branches and tags. Script inspired by the method described by StackOverflow answer http://stackoverflow.com/a/3972103/123597
Param(
[Parameter(Mandatory=$true, Position=1)]
[string]$SvnFolderPath,
[Parameter(Mandatory=$true, Position=2)]
[string]$TargetFolder,
[Parameter(Mandatory=$true, Position=3)]
[string]$GitUrl
)
git svn clone --stdlayout --no-metadata -A users.txt $SvnFolderPath "$TargetFolder-tmp"
@JamesSkemp
JamesSkemp / 00 Helpful Git Commands.md
Last active April 29, 2022 17:32
Helpful Git commands

This content has been moved to https://git.jamesrskemp.com/.

Helpful Git Commands

The following is a dump of Git commands for use on your shell of choice.

@JamesSkemp
JamesSkemp / Extract Frames from GIF.cs
Last active October 7, 2015 01:38
Extract frames from GIF
var imagePath = @"C:\Users\James\Desktop\HL0hEkH.gif";
var exportDirectory = @"C:\Users\James\SkyDrive\Projects\graphic samples\export\";
var exportPathFormat = exportDirectory + "{0}.png";
Image img = Image.FromFile(imagePath);
var totalFrames = img.GetFrameCount(FrameDimension.Time);
string.Format("Total frames: {0}", totalFrames).Dump();

Table altering, in T-SQL

Change table schema

Change the schema on an existing table.

ALTER SCHEMA projectManagement
TRANSFER dbo.RequestPriority

Change column

@JamesSkemp
JamesSkemp / Convert Sitecore Web forms sublayout to Helix and MVC.md
Last active October 17, 2017 16:08
Rough notes on converting a Sitecore Web forms sublayout to MVC and Helix.

Background

We currently have a Visual Studio solution with two projects: one for our main site, using Web forms, and one for utilities, which is currently Extension methods on Item. (The latter project has been in the queue to migrate to a NuGet package on our local NuGet server.)

Running Sitecore 8.1.160519.

Initial setups

  1. Add solution folders to the existing project.
    1. Configuration
    2. Feature
    3. Foundation
@jchandra74
jchandra74 / PowerShell Customization.md
Last active March 1, 2024 01:02
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@zuazo
zuazo / hb_all_books_dl.js
Last active September 10, 2022 14:36 — forked from p0kR/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
Forked from https://gist.github.com/p0kR/95e05e689be4e59b1b8fb6e383b9e25a
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
this fork downloads all formats and does so without using jquery (since that didnt work for me)
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
Settings (chrome://settings) --> Advanced --> Privacy and security --> Content settings --> PDF documents --> Download PDF files instead of automatically opening them in Chrome --> Turn ON
youtube.com##.ytp-ce-covering-overlay
youtube.com##.ytp-ce-element-shadow
youtube.com##.ytp-ce-covering-image
youtube.com##.ytp-ce-expanding-image
youtube.com##.ytp-ce-element.ytp-ce-video.ytp-ce-element-show