Skip to content

Instantly share code, notes, and snippets.

View progklb's full-sized avatar
🐢

Kevin Lloyd Baynham progklb

🐢
View GitHub Profile
@progklb
progklb / screenshotter.sh
Last active January 30, 2018 16:48
[Screenshotter] Captures screenshots at set intervals #shell #screenshot
#!/usr/bin/env bash
i=8364;while [ 1 ];do screencapture -t jpg -x ~/Desktop/screencapture/$i.jpg; let i++;sleep 10; echo $i; done
@progklb
progklb / argparse_example.py
Last active January 30, 2018 19:32
[ArgParse Usage] Example usage of argparse #python #arguments
import argparse
# See https://docs.python.org/3/library/argparse.html
# Main script logic starts here
parser = argparse.ArgumentParser(description = 'Keyword searcher for country information')
# Arguments
parser.add_argument('-n', '--name', dest = 'username', help = 'name of the current user', required = True)
parser.add_argument('-q', '--query', dest = 'query', help = 'keywords used in querying', required = True)
@progklb
progklb / FileCount_Results.txt
Last active February 2, 2018 22:05
[File Counter] Recursively count files #unity #dotnet
3 ./Assets
3 ./Library/ScriptAssemblies
44 ./Library/ShaderCache/0
47 ./Library/ShaderCache/1
39 ./Library/ShaderCache/2
46 ./Library/ShaderCache/3
45 ./Library/ShaderCache/4
61 ./Library/ShaderCache/5
52 ./Library/ShaderCache/6
67 ./Library/ShaderCache/7
@progklb
progklb / GestureAnalyser.cs
Last active January 30, 2018 16:50
[Naive Gesture Analyser] Attempts to recognize gestures in by comparing input position over time to a reference path. #unity #gesture
using UnityEngine;
using System;
using System.Text;
using System.Collections.Generic;
public class GestureAnalyser
{
#region EVENTS
public static Action<Gesture> gestureDetected = delegate {};
#endregion
@progklb
progklb / HttpDownloadExample.cs
Last active February 2, 2018 22:05
[Http Downloader] Hits an endpoint and awaits response. #dotnet #web
using System;
using System.Threading.Tasks;
using System.Net.Http;
namespace HttpDownloadExample
{
class Program
{
#region CONSTANTS
public const string URL = "https://unsplash.it/list";
@progklb
progklb / .gitignore
Last active February 2, 2018 22:05 — forked from octocat/.gitignore
[Global GitIgnore] Some common .gitignore configurations. #git
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@progklb
progklb / cloudSettings
Last active March 17, 2021 18:13
[Visual Studio Code Settings] Visual Studio Code Settings Sync Gist #config
{"lastUpload":"2021-03-17T18:13:54.968Z","extensionVersion":"v3.4.3"}
@progklb
progklb / update-commit-author.sh
Created January 20, 2021 20:19
[Update Git Commit Author] Overwrites git commit author information. #shell
git filter-branch -f --env-filter '
WRONG_EMAIL="kevin@fuzzylogicstudio.io"
NEW_NAME="Kevin Lloyd Baynham"
NEW_EMAIL="kevin.baynham.k7@gmail.com"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
@progklb
progklb / main.dart
Created May 12, 2021 20:10
[Flutter TestDrive] Example Flutter app, compilable. #flutter
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
@progklb
progklb / .editorconfig
Last active October 24, 2022 13:15
[Editor Config (C#)] Visual Studio Editor Config for CSharp #csharp #visualstudio
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4