Skip to content

Instantly share code, notes, and snippets.

View golf1052's full-sized avatar
🙃
¯\_(ツ)_/¯

Sanders Lauture golf1052

🙃
¯\_(ツ)_/¯
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main(string[] args)
{
var mapResult = new string[] {"🐕", "🐕", "🐕", "🐕"}.Select(e => "🐶");
PrintEnumerable(mapResult);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@golf1052
golf1052 / touch.ps1
Created January 15, 2017 21:15
Touch for Powershell
function Set-FileTime{
param(
[string[]]$paths,
[bool]$only_modification = $false,
[bool]$only_access = $false
);
begin {
function updateFileSystemInfo([System.IO.FileSystemInfo]$fsInfo) {
$datetime = get-date

Keybase proof

I hereby claim:

  • I am golf1052 on github.
  • I am golf1052 (https://keybase.io/golf1052) on keybase.
  • I have a public key whose fingerprint is E5DC 4AD9 5B08 6761 8EFA C5E7 6F88 AF7C BEE7 76D7

To claim this, I am signing this object:

@golf1052
golf1052 / golf1052.conf
Last active April 26, 2017 02:57
My Caddy configuration file
# Sites
https://www.golf1052.com, https://golf1052.com {
root /var/www/golf1052.com/public_html
ext .html
errors {
404 404.html
}
rewrite {
r \.(py|pyc|exe|sh|txt|ini|cs$)
to /404.html
#!/bin/sh
### BEGIN INIT INFO
# Provides: <SCRIPT_NAME>
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Script to run asp.net 5 application in background
### END INIT INFO
@golf1052
golf1052 / FeaturedStream
Created April 8, 2015 13:06
Testing featured stream stuffs
{"_links":{"self":"https://api.twitch.tv/kraken/streams/featured?limit=25&offset=0","next":"https://api.twitch.tv/kraken/streams/featured?limit=25&offset=25"},"featured":[{"text":"<p>Chris Notbusch presents a first person view of custom sculpture creation of video game characters! He welcomes questions and comments. Check out his <a href=\"http://www.notbuschmodeling.com\">web site</a> for more of his work.</p>\n\n<br>\n\n\n<p><a href=\"/cnotbusch\">Click here</a> to watch and chat live!</p>\n\n<p><a href=\"community,%20esports,%20dota,%20personality\"></a></p>\n","image":"http://s.jtvnw.net/jtv_user_pictures/hosted_images/cnotbusch_frontpage.png","title":"Chris Notbusch Modeling","sponsored":false,"priority":5,"scheduled":false,"stream":{"_id":13909605440,"game":"Reign Of Kings","viewers":318,"video_height":864,"average_fps":44.7517833144,"created_at":"2015-04-07T21:28:57Z","preview":{"small":"http://static-cdn.jtvnw.net/previews-ttv/live_user_cnotbusch-80x45.jpg","medium":"http://static-cdn.jtvnw.net/previ