Skip to content

Instantly share code, notes, and snippets.

View Cheesebaron's full-sized avatar
🧀
Send cheese please

Tomasz Cielecki Cheesebaron

🧀
Send cheese please
View GitHub Profile
@Cheesebaron
Cheesebaron / BaseView.cs
Created June 17, 2015 13:54
MvvmCross Windows Phone 8.1 BaseView
using System.Windows.Input;
using Windows.Phone.UI.Input;
using Windows.UI.Xaml.Navigation;
using Cirrious.MvvmCross.ViewModels;
using Cirrious.MvvmCross.WindowsCommon.Views;
namespace Lolz.WindowsPhone.Views
{
public abstract class BaseView<T> : MvxWindowsPage<T> where T : MvxViewModel
{
@Cheesebaron
Cheesebaron / WebViewLocationActivity.cs
Last active March 30, 2021 20:51
WebView Location prompt sample
using Android;
using Android.App;
using Android.Content;
using Android.Webkit;
using Android.OS;
[assembly: UsesPermission(Name = Manifest.Permission.AccessFineLocation)]
[assembly: UsesPermission(Name = Manifest.Permission.Internet)]
namespace WebViewLocation
am start --user 0 -n com.android.settings/.DevelopmentSettings
@Cheesebaron
Cheesebaron / outlook.ahk
Created May 6, 2015 12:34
Auto Hotkey remap for Outlook 2013
#IfWinActive ahk_exe OUTLOOK.EXE
^!z::SendInput æ
^!+z::SendInput Æ
^!w::SendInput å
^!+w::SendInput Å
^!l::SendInput ø
^!+l::SendInput Ø
@Cheesebaron
Cheesebaron / CherylsBirthday.cs
Last active August 29, 2015 14:19
LINQPad script with a programmatic solution to the following logic puzzle. All credit goes to Peter Norvig's and his solution here: http://nbviewer.ipython.org/url/norvig.com/ipython/Cheryl.ipynb
// LINQPad script with a programatical solution to the following logic puzzle.
// All credit goes to Peter Norvig's and his solution here:
// http://nbviewer.ipython.org/url/norvig.com/ipython/Cheryl.ipynb
// 1. Albert and Bernard just became friends with Cheryl, and they want to know when her birtxhday is.
// Cheryl gave them a list of 10 possible dates:
// May 15 May 16 May 19
// June 17 June 18
// July 14 July 16
// August 14 August 15 August 17
@Cheesebaron
Cheesebaron / AppDelegate.cs
Created February 18, 2015 09:57
iOS Background Tasks
using System;
using System.Diagnostics;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Foundation;
using ModernHttpClient;
using UIKit;
namespace App6
@Cheesebaron
Cheesebaron / CodeShareReport.linq
Last active August 29, 2015 14:11 — forked from praeclarum/CodeShareReport.cs
LinqPad script counting lines. Yay \o/
// based on https://gist.github.com/praeclarum/1608597
void Main()
{
var projects = new List<Solution> {
new Solution {
Name = "Windows 8",
ProjectFiles = new List<string> {
"C:\\vcs\\git\\MastersThesis\\NoiseSentinelApp\\NoiseSentinelApp.Store\\NoiseSentinelApp.Store.Windows\\NoiseSentinelApp.Store.Windows.csproj",
"C:\\vcs\\git\\MastersThesis\\NoiseSentinelApp\\NoiseSentinelApp.Store\\NoiseSentinelApp.Store.Shared\\NoiseSentinelApp.Store.Shared.projitems",
@Cheesebaron
Cheesebaron / HangMan.java
Last active August 29, 2015 14:10
Shitty hangman
import java.util.*;
public class HangMan {
private static String[] words = {
"motherboard", "case", "powersupply", "harddrive", "mouse", "keyboard", "peripheral",
"graphicscard", "processor", "latency", "ping", "gaming", "resolution", "watercooling",
"cache", "memory", "chipset", "intel", "notebook", "desktop", "aliasing" };
public static void main(String[] args) {
Random rand = new Random();
@Cheesebaron
Cheesebaron / solaziredcsharp.sty
Created December 8, 2014 01:12
A solarized light theme for LaTeX C# code listings
\usepackage{listings}
\usepackage{etoolbox}
\usepackage{color}
\definecolor{base0}{RGB}{131,148,150}
\definecolor{base01}{RGB}{88,110,117}
\definecolor{base2}{RGB}{238,232,213}
\definecolor{sgreen}{RGB}{133,153,0}
\definecolor{sblue}{RGB}{38,138,210}
\definecolor{scyan}{RGB}{42,161,151}
@Cheesebaron
Cheesebaron / CallActivity.cs
Last active September 23, 2015 11:36
Handle call and dial intents
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.OS;
using Android.Widget;
namespace Your.Namespace
{
[Activity(Label = "Call", LaunchMode = LaunchMode.SingleTop)]
[IntentFilter(new[] { Intent.ActionCall, Intent.ActionView },