Skip to content

Instantly share code, notes, and snippets.

View jan-molak's full-sized avatar
🌻
For better automated tests, try Serenity/JS!

Jan Molak jan-molak

🌻
For better automated tests, try Serenity/JS!
View GitHub Profile
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
echo "Cappuccino"

Follow these steps to install graphite on OS X Mavericks.

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends

@jan-molak
jan-molak / readme.md
Last active August 29, 2015 14:20 — forked from RaVbaker/readme.md

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

@jan-molak
jan-molak / authoriser.js
Created April 6, 2016 15:52
Mocking JavaScript a little code examples
'use strict';
/** @constructor */
function Authoriser() { }
/**
* @public
*
* @param {String} username
* @param {String} password
@jan-molak
jan-molak / delete.bat
Created December 7, 2018 12:05 — forked from DavidEdwards/delete.bat
Delete all files and directory structure at the given path
@echo off
REM Completely delete file / directory
echo Are you sure that you want to delete %1?
echo y/n
choice /c:yn > nul
if errorlevel 2 goto no
if errorlevel 1 goto start
@jan-molak
jan-molak / private_fork.md
Created July 22, 2020 10:08 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

<form id="quiz">
<section class="quiz-question">
<h3>How much of Earth's water is fresh?</h3>
<ul class="answers">
<li>23%</li>
<li>3%</li>
<li>42%</li>
</ul>
import { Target } from '@serenity-js/protractor';
import { by } from 'protractor';
class Quiz {
static questions = () =>
Target.all('questions').located(by.css('.quiz-question'))
}
class QuizQuestion {
static title = () =>