Skip to content

Instantly share code, notes, and snippets.

View timheuer's full-sized avatar
🚴‍♂️
https://twitter.com/timheuer

Tim Heuer timheuer

🚴‍♂️
https://twitter.com/timheuer
View GitHub Profile
@timheuer
timheuer / FlowLayoutWithStickyHeaders.h
Created July 4, 2014 05:51
FlowLayoutWithStickyHeaders
//
// FlowLayoutWithStickyHeaders.h
// From: http://blog.radi.ws/post/32905838158/sticky-headers-for-uicollectionview-using
//
// Created by Tim Heuer on 7/3/14.
//
#import <UIKit/UIKit.h>
@interface FlowLayoutWithStickyHeaders : UICollectionViewFlowLayout
@timheuer
timheuer / get-intent.cs
Created January 6, 2017 16:06
Get the Intent from the IntentRequest
if (request.GetRequestType() == typeof(IntentRequest) {
// get the intent
var theIntent = ((IntentRequest)request).Intent;
// get the name
// theIntent.Name
// do stuff with slots
// theIntent.Slots
}
<NavigationView>
<NavigationView.MenuItems>
<NavigationMenuItem />
</NavigationView.MenuItems>
</NavigationView>
@timheuer
timheuer / purge_advertisers.md
Created December 29, 2018 04:22 — forked from scarlac/purge_advertisers.md
Facebook Hack: Purge list of "Advertisers you've interacted with"

For those of you who want to remove all in “Advertisers you’ve interacted with”:

  1. Go to https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen and open the section "Advertisers you've interacted with"
  2. Open Web Inspector
  3. Copy-paste this script to load all advertisers: javascript:smt=setInterval(() => {let x=document.querySelector('div[shade=medium]'); x ? x.click() : clearInterval(smt), console.log('done')}, 1000)
  4. It will output a number. Wait for it to say “done” in the console. This may take a long time. you'll notice the scrollbar changing while it's loading all advertisers.
  5. Copy-paste this and press enter: javascript:document.querySelectorAll('[data-tooltip-content="Remove"]').forEach(el =&gt; el.click())
@timheuer
timheuer / profiles.json
Created May 21, 2019 20:44
custom-scheme
{
"name": "TimCustom",
"foreground": "#EEEEEC",
"background": "#555753",
"black": "#555753",
"red": "#3465A4",
"green": "#4E9A06",
"yellow": "#C4A000",
"blue": "#3465A4",
"purple": "#75507B",
@timheuer
timheuer / param.snippet
Created October 11, 2019 21:53
blazor component parameter
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Blazor Component Parameter</Title>
<Shortcut>param</Shortcut>
<Description>Code snippet for a parameter in a component with public get/set</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
@timheuer
timheuer / twitterinterests.js
Created December 1, 2019 06:15
remove interests on twitter
// https://twitter.com/settings/your_twitter_data/twitter_interests/interest
var x = document.querySelectorAll("input[checked]");
var i;
for (i = 0; i < x.length; i++) {
x[i].checked = "";
}
@timheuer
timheuer / build.yaml
Last active December 13, 2019 18:30
build and deploy to nuget
name: .NET Core Build and Deploy
on: [push]
jobs:
build:
#if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
name: Build
runs-on: ubuntu-latest
<file>
<categories>
<category>cat1</category>
<category>cat2</category>
<category>removecategory</category>
<category>keepthisone</category>
<category>deletethisone</category>
<category>somethingelse</category>
</categories>
<otherstuff></otherstuff>
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import * as core from '@actions/core'
import * as toolcache from '@actions/tool-cache'
import * as exec from '@actions/exec'
import { ExecOptions } from '@actions/exec/lib/interfaces'
import httpClient = require('typed-rest-client/HttpClient');
import {HttpClientResponse} from 'typed-rest-client/HttpClient';
const IS_WINDOWS = process.platform == 'win32'