Skip to content

Instantly share code, notes, and snippets.

View hjerpbakk's full-sized avatar
🌝
Full-stack TypeScript 

Runar Ovesen Hjerpbakk hjerpbakk

🌝
Full-stack TypeScript 
View GitHub Profile
@mnuck
mnuck / getAPOD.py
Created June 11, 2012 19:53
Grabs the Astronomy Picture of the Day
#!/usr/bin/env python
# Grab the Astronomical Picture of the Day from NASA's site.
# Make it the desktop background, if it's a jpg
#
# Matthew Nuckolls
import urllib2
import re
import subprocess
base_url = "http://apod.nasa.gov/apod/"
IT'S SHOWTIME
HEY CHRISTMAS TREE isLessThan100
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE n
YOU SET US UP 0
HEY CHRISTMAS TREE multiple
YOU SET US UP @NO PROBLEMO
STICK AROUND isLessThan100
@GuillaumeJasmin
GuillaumeJasmin / GoogleMapsIconMarker.m
Last active April 13, 2023 05:02
iOS GoogleMaps icon marker with image and text
// image
UIImageView *iconView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 30, 50)];
iconView.image = [UIImage imageNamed:@"my-icon-image"];
// text
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 35, 50)];
label.text = @"test";
[iconView addSubview:label];
// grab it
@jonlipsky
jonlipsky / CustomAlertView.cs
Created August 12, 2014 05:38
CustomAlertView
using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using System.Collections.Generic;
using System.Drawing;
using MonoTouch.CoreGraphics;
using MonoTouch.CoreAnimation;
using System.Threading.Tasks;
/**
@andmos
andmos / Build, test and deploy .NET apps with Vagrant and Docker.md
Created January 30, 2015 20:17
Build, test and deploy .NET apps with Vagrant and Docker

Build, test and deploy .NET apps with Vagrant and Docker

On a resent project at work we build a cross-platform chat-application with Xamarin and SignalR. The SignalR-hub was to find it's home on a Linux-server, given ASP.NETs new found love for other platforms than Windows and IIS. We had limited time and the back-end guys were developing the hub in Visual Studio. To help them make sure the code they wrote would be Mono-compatible (and easy to deploy for testing), I turned to my two favorite pieces of open source technology: Vagrant and Docker.

###The code First, I wrote a simple Dockerfile based on the latest Mono-baseimage that adds the code and runs xbuild in the build-process. When the container is run without parameters, it deploys the server.

FROM mono:latest

11 Fallacies of Distributed Computing
1. The network is reliable (Bill Joy, Tom Lyon)
2. Latency isn't a problem (Bill Joy, Tom Lyon)
3. Bandwidth isn't a problem (Bill Joy, Tom Lyon)
4. The network is secure (Bill Joy, Tom Lyon)
5. The topology won't change (Peter Deutsch)
6. The administrator will know what to do (Peter Deutsch)
7. Transport cost isn't a problem (Peter Deutsch)
8. The network is homogeneous (James Gosling)
@DanielSWolf
DanielSWolf / Program.cs
Last active July 16, 2024 20:29
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@mackuba
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
@parmentf
parmentf / GitCommitEmoji.md
Last active July 17, 2024 01:20
Git Commit message Emoji
@wojteklu
wojteklu / clean_code.md
Last active July 17, 2024 11:23
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules