Skip to content

Instantly share code, notes, and snippets.

💭
Somewhere on the call stack

Jamie Taylor GaProgMan

💭
Somewhere on the call stack
Block or report user

Report or block GaProgMan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GaProgMan
GaProgMan / startup.cs
Last active Jan 8, 2019
CORS example - .NET Core
View startup.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddCors(options =>
{
options.AddPolicy("nameOfPolicyHere", builder =>
{
builder.WithOrigins("array of strings", "representing origins");
// headers can be complext to start with, so I would start with
//builder.AllowAnyHeader();
// just to get it working first, then reduce the number of headers
@GaProgMan
GaProgMan / avconv-bash-script.sh
Last active Aug 24, 2016
Calls avconv on all mkv container files found in the folder on which it is run.
View avconv-bash-script.sh
# assumes that all subtitles have been removed
# and only one audio stream (and it is located at 0:1)
# TODO: add support for all subtitle and audio tracks
for file in *.mkv
do
# extract and convert audio
echo Extracting audio from "$file"
avconv -i "$file" -map 0:1 -c:a aac -b:a 160k -strict experimental audio_$(basename "$file" .mkv).m4a
@GaProgMan
GaProgMan / SmsFixer.cs
Last active Feb 24, 2016
Sms XML fixer
View SmsFixer.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Serialization;
namespace SmsFixer
{
static class Program
{
@GaProgMan
GaProgMan / CV.tex
Last active Aug 3, 2019
The LaTeX Template that I have used for typesetting my C.V for several years.
View CV.tex
%%% LaTeX Template: Curriculum Vitae
%%%
%%% Source: http://www.howtotex.com/
%%% Feel free to distribute this template, but please keep the referal to HowToTeX.com.
%%% Date: July 2011
%%% Edited by Jamie Taylor (http://gaprogman.com)
%%% Added a definition for a "hobbies" section
%%% Added pdfinfo call to add metadata to outputted PDF
%%% Date April 2015
@GaProgMan
GaProgMan / JavaScriptPlayground
Last active Aug 29, 2015
A scratch-pad (playground) for javascript stuff, as I learn it.
View JavaScriptPlayground
/* Invoking functions via parameters to other functions */
var work = function() {
console.log("this is being invoked");
};
var doWork = function(f) {
console.log("invoking work");
try {
f();
} catch (ex) {
@GaProgMan
GaProgMan / EqualsOverloading.cs
Last active Apr 24, 2019
An example of how to over load the ==, !=, Equals and GetHashCode operators and methods for a custom class in C#
View EqualsOverloading.cs
using System;
namespace ScratchPad
{
public class Foo
{
private string _name;
private string _title;
private string _address;
private bool _contacted;
View BigDipper.cpp
/*
* Project Name: BigDipper
* Solution Name: BigDipper
* Original creation date: 24/03/2008
* Edit date: 19/01/2013
* Programmer name: Jamie Taylor (aka "GaProgMan")
* File name: VBigDipper.cpp
*
* Purpose of the project:
* My favourite constellation is the Big Dipper. So
@GaProgMan
GaProgMan / Parents.pl
Last active Dec 25, 2015
A short Prolog script that works with a family dataset. There are basic commands to reason the relationships of the members of the family.
View Parents.pl
/*
* Project Name: Parents
* Solution Name: Parents
* Original creation date: 01/10/2006
* Edit date: 11/10/2013
* Programmer name: Jamie Taylor (aka "GaProgMan")
* File name: parents.pl
*
* Purpose of the project:
* This project was undertaken as coursework in class
@GaProgMan
GaProgMan / yuv.c
Created Feb 3, 2013
A VERY basic code implementation for converting from RGB colour space to YUV colour space
View yuv.c
/*
* Project Name: RGB to Y'UV
* Solution Name: RGB to Y'UV
* Original creation date: 19/11/2011
* Edit date: 18/01/2013
* Programmer name: Jamie Taylor (aka "GaProgMan")
* File name: YUV.c
*
* Purpose of the project:
* I was reading through a wikipedia article on
@GaProgMan
GaProgMan / VideoFrameSizes.c
Created Jan 20, 2013
A quick and dirty explanation (through C code) of why we need video compression techniques
View VideoFrameSizes.c
/*
* Project Name: VideoFrameSizes
* Solution Name: MandelbrotCalc
* Original creation date: 24/03/2011
* Edit date: 19/01/2013
* Programmer name: Jamie Taylor (aka "GaProgMan")
* File name: VideoFrameSizes.c
*
* Purpose of the project:
* To underpin the reasons why video compression exist
You can’t perform that action at this time.