Skip to content

Instantly share code, notes, and snippets.

View hagbarddenstore's full-sized avatar

Kim Johansson hagbarddenstore

View GitHub Profile
Ring-ding-ding-ding-dingeringeding!
Gering-ding-ding-ding-dingeringeding!
Gering-ding-ding-ding-dingeringeding!
Wa-pa-pa-pa-pa-pa-pow!
Wa-pa-pa-pa-pa-pa-pow!
Wa-pa-pa-pa-pa-pa-pow!
Hatee-hatee-hatee-ho!
Hatee-hatee-hatee-ho!
@hagbarddenstore
hagbarddenstore / send-message.php
Created October 30, 2013 10:35
A small example on how to use the MobileResponse HTTP API via PHP with cURL.
<?php
$data = array(
'data' => array(
'username' => 'username',
'password' => 'password',
'senderName' => 'SndrName',
'message' => 'The message',
'recipients' => array(
'+46700000000'
)
void Main()
{
var a = new A();
var b = new B();
a.One();
a.Two();
b.One();
b.Two();
void Main()
{
var a = "1234";
var b = "abcd";
Console.WriteLine(IsValid(a)); // True
Console.WriteLine(IsValid(b)); // False
}
bool IsValid(string s)
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Api_Web:Package">
<MSBuild
Condition="'%(ProjectReference.Identity)' == '$(SolutionDir)src\Api.Web\Api.Web.csproj'"
Projects="@(ProjectReference)"
Targets="Package"
BuildInParallel="True"
ToolsVersion="4.0"
Properties="BuildingSolutionFile=True; CurrentSolutionConfigurationContents=$(CurrentSolutionConfigurationContents); SolutionDir=$(SolutionDir); SolutionExt=$(SolutionExt); SolutionFileName=$(SolutionFileName); SolutionName=$(SolutionName); SolutionPath=$(SolutionPath)"
@hagbarddenstore
hagbarddenstore / Program.cs
Created October 20, 2013 19:52
A guess the number game!
namespace E
{
using System;
public static class Program
{
public static void Main()
{
var random = new Random();
var response = string.Empty;
namespace A
{
using System;
using System.Linq;
using System.ComponentModel;
public static class Program
{
public static void Main()
{
namespace ProjectCompany
{
public class Employee
{
private string firstName;
private string secondName;
private Company company;
private Employee supervisor;
public Employee (string firstName, string secondName, Company company, Employee supervisor)
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="ColoredConsoleAppender" type="log4net.Appender.ColoredConsoleAppender">
<mapping>
<level value="INFO" />
<foreColor value="White, HighIntensity" />
</mapping>
<mapping>
<level value="ERROR" />
<foreColor value="Red, HighIntensity" />
db.createCollection("Folders");
db.Folders.ensureIndex({ "UserId": 1 });
db.Folders.insert({ "UserId": 1 });
db.Folders.update({ "UserId": 1 }, { $set: { "Folders.A": { "Name": "A" } } });
db.Folders.update({ "UserId": 1 }, { $set: { "Folders.B": { "Name": "B" } } });
db.Folders.update({ "UserId": 1 }, { $set: { "Folders.C": { "Name": "C" } } });
db.Folders.update({ "UserId": 1 }, { $set: { "Folders.D": { "Name": "D" } } });
db.Folders.update({ "UserId": 1 }, { $unset: { "Folders.B" : "" } });
db.Folders.update({ "UserId": 1}, { $set: { "Folders.A.Folders.A": { "Name": "A" } } });