Skip to content

Instantly share code, notes, and snippets.

View KevinLiddle's full-sized avatar
🐶
🤷‍♂️

Kevin Liddle KevinLiddle

🐶
🤷‍♂️
  • 8th Light
  • Chicago
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kevinliddle on github.
  • I am krevinl (https://keybase.io/krevinl) on keybase.
  • I have a public key ASCn1poK3V_hYDThiTB0IWRDZKhXfO5BYIt58eLbNCDJCwo

To claim this, I am signing this object:

@KevinLiddle
KevinLiddle / convert_files_to_utf8.sh
Created August 12, 2016 16:05
Converts the files given to the script from ISO-8859-1 to UTF-8 encoding
#! /bin/sh
for f in $@
do
name="${f%.*}"
ext="${f##*.}"
unconverted_name="${name}_copy.${ext}"
mv $f $unconverted_name
iconv -f ISO-8859-1 -t UTF-8 $unconverted_name > $f
rm $unconverted_name
@KevinLiddle
KevinLiddle / jekyll-seo.rb
Created October 13, 2014 13:53
Changing jekyll routes
Dir.foreach('.') do |dir|
file = File.join(dir, "archive.html")
if File.exists?(file) && !file.start_with?("_")
archive = File.read(file)
author = file.split("/").first
new_archive = archive
.split("\n")
.insert(-2, "permalink: /#{author}/\nredirect_from:\n - /#{author}/archive/\n - /#{author}/archive.html")
.join("\n")
@KevinLiddle
KevinLiddle / run_tests.sh
Created June 13, 2014 21:32
Runs all of the tests for WLCF's and PG's Algorithm and Data Structures course
RESULTS=()
for week in $(find . -name 'week_[0-9]')
do
echo "************************** Running tests for $week **************************"
(
if [ -d "$week/in_class" ]
then
(cd "$week/in_class" && rspec)
fi
object HelloWorld {
def main(args: Array[String]) = {
Console.println("Hello, world!");
}
}
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
module Main where
main = putStrLn "Hello, World!"
-module(hello).
-export([hello_world/0]).
hello_world() -> io:fwrite("hello, world\n").
#include<stdio.h>
main()
{
printf("Hello World");
}
function square(x)
{
return
x * x;
}
square(10);