Skip to content

Instantly share code, notes, and snippets.

def serie(n):
seq = "1"
for i in range(n):
print(seq)
seq = next_seq(seq)
def next_seq(num):
curr = 0
count = 0
res = ""
@mrkaspa
mrkaspa / readme.md
Created February 13, 2017 16:43
atom-backup

atom backup

'.source.go':
'package':
'prefix': 'pack'
'body': 'package $1'
'return':
'prefix': 'ret'
'body': 'return $1'
@mrkaspa
mrkaspa / vstart
Created January 5, 2017 02:35
Vscode bug fix
#!/usr/bin/env bash
/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --force-gpu-rasterization
@mrkaspa
mrkaspa / build.bash
Created October 10, 2016 15:49
Golang build for different platforms
#!/usr/bin/env bash
set -ex
# This script builds archiver for most common platforms.
export CGO_ENABLED=0
cd cmd/archiver
GOOS=linux GOARCH=386 go build -o ../../builds/archiver_linux_386
GOOS=linux GOARCH=amd64 go build -o ../../builds/archiver_linux_amd64
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"application" : "right_option",
"left_option": "left_command",
"left_command": "left_option",
"right_command": "right_option",
@mrkaspa
mrkaspa / pre-commit
Created September 16, 2016 21:59 — forked from matteosister/pre-commit
pre-commit hook for elixir
#!/bin/sh
# credo checks before commit
mix credo
CREDO_RES=$?
if [ $CREDO_RES -ne 0 ]
then
exit $CREDO_RES
fi
@mrkaspa
mrkaspa / build.gradle
Created August 30, 2016 18:46
Calling spark from jruby
/*
* This project is intended to be used as an acceptance test *and* a
* documentation example. If you change this file, please be sure that it
* renders appropriately in the generated documentation
*/
buildscript {
repositories { jcenter() }
dependencies {
/* here to make sure that our dependencies get loaded in properly under
package models
type mockPersistor struct {
}
func NewMockPersistor() Persistance {
return mockPersistor{}
}
func (p mockPersistor) PersistAndFind(sn StrokeNear) ([]Stroke, error) {
package models
import (
"fmt"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"gopkg.in/mgo.v2/bson"
)