Skip to content

Instantly share code, notes, and snippets.

View AdamMaras's full-sized avatar

Adam Maras AdamMaras

  • Phoenix, Arizona, United States
View GitHub Profile
@AdamMaras
AdamMaras / vdom-generator-sample.jsx
Created July 27, 2017 18:00
VDOM with generators sample
import { render } from "vdom-generator";
function* Clock(props, update) {
let clockText = new Date().toTimeString();
const timer = setInterval(() => {
clockText = new Date().toTimeString();
update.onAnimationFrame();
}, props.interval);
@AdamMaras
AdamMaras / GitHubTrendingWeekly.ps1
Last active June 26, 2016 16:02 — forked from NickCraver/GitHubTrendingWeekly.ps1
A weekly task that pops up https://github.com/trending in Chrome to find interesting OSS projects.
Register-ScheduledTask `
-Action (New-ScheduledTaskAction `
-Execute ((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe")."(default)") `
-Argument 'https://github.com/trending') `
-Trigger (New-ScheduledTaskTrigger -Weekly -DaysOfWeek Monday -At 3am) `
-TaskName "GitHub Trending" `
-Description "Weekly check of GitHub trending repos."

Keybase proof

I hereby claim:

  • I am AdamMaras on github.
  • I am adammaras (https://keybase.io/adammaras) on keybase.
  • I have a public key whose fingerprint is B45E 17ED BC89 1E07 FEB6 F5D5 2095 14FB 59B3 58C7

To claim this, I am signing this object:

@AdamMaras
AdamMaras / redux-inject.js
Created November 7, 2015 17:30
Redux dependency injection middleware
export default function createInjectMiddleware(map) {
return store => next => action => {
if (typeof action !== "object"
|| typeof action.payload !== "function"
|| action.meta == null
|| action.meta.inject == null) {
return next(action);
}
const defaultInjections = {
@AdamMaras
AdamMaras / AssemblyExtensions+LinkerTimestamp.cs
Created September 16, 2014 22:07
Get assembly linker timestamp
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Reflection;
public static class AssemblyExtensions
{
private const int PortableExecutableHeaderLocationOffset = 60;
private const int LinkerTimestampLocationOffset = 8;