Skip to content

Instantly share code, notes, and snippets.

View puumuki's full-sized avatar

Teemu Puukko puumuki

  • Finland, Jyväskylä
View GitHub Profile
@puumuki
puumuki / html5.html
Created March 25, 2015 17:29
html - html5 template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Blank HTML5</title>
<style>
</style>
</head>
<body>
@puumuki
puumuki / sublimetext3-linux.sublime-keymap
Created March 25, 2015 11:25
sublime-text-3: keysortcuts
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
@puumuki
puumuki / model.js
Created March 25, 2015 11:24
js: backbone: model
define(function (require) {
var Model = require('model');
/**
* ExampleModel (= tila)
* @namespace models.<package>
* @class ExampleModel
* @extends Backbone.Model
* @constructor
@puumuki
puumuki / bittimaski.py
Last active August 29, 2015 14:14
python - bittimaskaus
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Tämä on yksi tapa tehdä kiva bittikartta pyyttonilla kokonaislukumuuttujaan.
#Enemmän Pythonin kokonaisluku muuttujista PEP-0237
#https://www.python.org/dev/peps/pep-0237/
from enum import IntEnum
class Paiva(IntEnum):
maanantai =1 #0x01 0000 0001
@puumuki
puumuki / osx_supported_games.py
Created October 21, 2014 04:41
python - osx supported games
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from functools import reduce
from collections import namedtuple
games = [
("10,000,000",True),
("Ace of Spades",False),
("Alien Swarm",False),
("BRINK",False),
@puumuki
puumuki / varmuuskopioija.py
Last active August 29, 2015 14:01
python - varmuuskopioija
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from shutil import copy
from zipdir import zipdir
from datetime import datetime
from time import timezone
SOURCE = ""
LOCAL_BACKUP = ""
@puumuki
puumuki / henkilotunnus.py
Last active March 4, 2023 19:07
python - henkilotunnus - Finnish social security number generator, validator and information extractor
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#The MIT License (MIT)
#Copyright (c) 2014 Teemu Puukko
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights