Skip to content

Instantly share code, notes, and snippets.

#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
(function ($, _, MyApp) {
"use strict";
$.ns("MyApp.Notification");
MyApp.Notification.FlashMessages = (function () {
var defaultOptions = {
cookieName: 'flashes',
templateSelector: '#flash-message-template',
containerSelector: '#flash-messages'
brew config
==========
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 35e7693ce4541d7ade641096701e9e2ca8f4cc31
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.9.4-x86_64
Xcode: 5.1.1
@omissis
omissis / PlainDataMatcher.php
Created January 21, 2015 13:02
PlainDataMatcher
<?php
/**
* @file
* Contains \Drupal\rules\DataMatcher\DataMatcherInterface.
*/
namespace Drupal\rules\DataMatcher;
/**
@omissis
omissis / .phpstorm.meta.php_phpunit.meta.php
Created November 7, 2017 13:22
phpstorm's phpunit's prophesize support
namespace PHPSTORM_META {
override(\PHPUnit\Framework\TestCase::prophesize(0),
map([
'' => '@',
])
);
}
@omissis
omissis / shorturl_test.go
Last active December 25, 2024 10:00
go table tests example
package shorturl_test
import (
"fmt"
"github.com/omissis/ristretto/internal/domain/shorturl"
"github.com/omissis/ristretto/internal/test/mock"
"reflect"
"testing"
)
package shorturl
func NewResolveService(r RecordRepository) *ResolveService {
return &ResolveService{
repository: r,
}
}
type ResolveService struct {
repository RecordRepository