Skip to content

Instantly share code, notes, and snippets.

@martinbowling
martinbowling / gist:1987596
Created March 6, 2012 17:23 — forked from eric/gist:701636
ReaderJSController.originalArticleFinder()
/* ReaderJSController.originalArticleFinder(): */
{
"contentDocument": [object HTMLDocument],
"didSearchForArticleNode": true,
"article": [object Object],
"didSearchForPrependedArticleNode": true,
"prependedArticle": null,
"_cachedScrollY": 0,
"_cachedScrollX": 0,
"_elementsWithCachedBoundingRects": [object HTMLDivElement],
public void sendTweet(string updateText)
{
ACAccountStore account = new ACAccountStore();
var accountType = account.FindAccountType(ACAccountType.Twitter);
account.RequestAccess(accountType,(granted,NSError)=> {
if(!granted)
return;
var arrayOfAccounts = account.FindAccounts(accountType);
if(arrayOfAccounts != null && arrayOfAccounts.Length == 0)
@martinbowling
martinbowling / AppDelegate.cs
Created April 11, 2012 17:41 — forked from conceptdev/AppDelegate.cs
CoreImage quick'n'dirty sample: Contrast/Saturation/Brightness editing (screenshot http://twitpic.com/93gfty)
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace ColorControl {
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
@martinbowling
martinbowling / ViewExtensions.cs
Created June 17, 2012 16:29 — forked from ChuckSavage/ViewExtensions.cs
MonoTouch Swipe Event
using System.Collections.Generic;
using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;
using MonoTouch.UIKit;
namespace iOSLib
{
public static class ViewExtensions
{
static Dictionary<UIView, Dictionary<UISwipeGestureRecognizerDirection, SwipeClass>>
@martinbowling
martinbowling / putiodl
Created February 1, 2017 20:45 — forked from neal/putiodl
put.io cli downloader
#!/bin/bash
#
# putiodl - put.io cli downloader
#
# Copyright (C) 2013 Neal <[email protected]>
#
# Dependencies: jq, curl, wget
#
# Make sure ~/.putiodl exists and contains your put.io OAuth token.
#
@martinbowling
martinbowling / .htaccess
Created March 9, 2019 23:01 — forked from jdevalk/.htaccess
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>
@martinbowling
martinbowling / mask-links.php
Created March 9, 2019 23:01 — forked from chrisguitarguy/mask-links.php
Mask external WordPress links behind a redirect.
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://coywolf.pro",
"name": "Coywolf"
@martinbowling
martinbowling / specific_gpt.py
Created January 23, 2023 17:47 — forked from danielgross/specific_gpt.py
A chat interface that drives GPT-3 towards more specific answers.
"""Stream a response from the OpenAI completion API."""
import os
import re
import sys
import time
import random
import openai
openai.api_key = open(os.path.expanduser("~/.openai")).read().strip()
@martinbowling
martinbowling / linkedinJobs.js
Created August 12, 2023 01:56 — forked from adrianhorning08/linkedinJobs.js
Linkedin Jobs Scraper
import fetch from "node-fetch";
import fs from "graceful-fs";
import * as cheerio from "cheerio";
async function getJob(id) {
try {
const response = await fetch(
`https://www.linkedin.com/jobs-guest/jobs/api/jobPosting/${id}`,
{
// agent: getProxyAgent(), put proxy here