Skip to content

Instantly share code, notes, and snippets.

/// <reference path="../../typings/tsd.d.ts" />
///
import {PipeFactory} from 'angular2/src/change_detection/pipes/pipe';
import {async} from 'angular2/src/change_detection/change_detection';
import {NullPipeFactory, Pipe, PipeRegistry, defaultPipes} from 'angular2/change_detection';
import {bind} from 'angular2/di';
import {ObservablePipe} from 'angular2/pipes';
import * as Rx from 'rx';
export function isObservable(obs) {
@esfand
esfand / github-push.sh
Last active August 29, 2015 14:16 — forked from timmmmyboy/github-push.sh
Script to sync all changes between DokuWiki and GitHub
cd /home/username/public_html/data/pages/
git pull
git add -A
git commit -m "Dokuwiki external edit"
git push origin master
Char Unicode
------------------------------
Ä, ä \u00c4, \u00e4
Ö, ö \u00d6, \u00f6
Ü, ü \u00dc, \u00fc
ß \u00df
package fi.markoa.experiment.servlet3;
import javax.servlet.AsyncContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
package de.YonasCode.TheCore.MultiMap;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Set;
public class MultiMap<A, B, C> implements Cloneable, Iterable<A>, Serializable {
import com.memetix.mst.language.Language;
import com.memetix.mst.translate.Translate;
public class ExampleTranslation {
public static void main(String[] args) throws Exception {
//Replace client_id and client_secret with your own.
Translate.setClientId("CLIENT_ID_HERE");
Translate.setClientSecret("CLIENT_SECRET_HERE");
// Translate an english string to spanish
// snippet written for and relates to:
// http://autumnator.wordpress.com/2014/09/23/selenium-page-objects-beyond-pages-like-a-cart-object/
/**
* Cart item implementation as a data structure
* containing a related set of WebElements to work with
*
* These cart items reside in and can be extracted from
* shopping cart page object to then be worked with.
**/
package selenium;
import java.sql.Driver;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Wait;
<!DOCTYPE html>
<!-- http://www.sivalabs.in/2014/09/angularjs-different-ways-of-using-array.html -->
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My AngularJS App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
@esfand
esfand / db-changelog.xml
Created August 16, 2014 12:20 — forked from wilmoore/db-changelog.xml
Liquibase
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
<!--
<include file=".+(.sql|.xml)" />