Skip to content

Instantly share code, notes, and snippets.

=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@moki9
moki9 / ConfigureBitbucketHookForJenkins.md
Last active August 29, 2015 14:25 — forked from joseraya/ConfigureBitbucketHookForJenkins.md
Configure Bitbucket hook for jenkins

In order to configure the bitbucket hook we need two things: The user's API Token and the project token. In order to retrieve the first one whe should click on our username (on the top right corner of the page), click on configure and then click on "Show API Token". This API token will be used as password for our user.

For the project's token we need to go to the job configuration (/job/{job-name}/configure), "build triggers" and enable "trigger remote builds" and, there, input some random text as token.

Once we have these two tokens we can go to bitbucket, repo administration, hooks section, and add a new jenkins hook that we will configure like:

  • Endpoint: http://{username}:{APIToken}@{hostname}/{prefix_if_you_have_one}
  • Module name: Whatever (I usually leave this one blank)
  • Project name: The job name
  • Token: The project token
@moki9
moki9 / python-flask-task-async.py
Last active September 9, 2015 06:25 — forked from abn/python-flask-task-async.py
A module to facilitate dispatch of asynchronous tasks in a Flask App. This was designed to work standalone in an embedded fashion without dependencies like flask-celery, redis etc. This is not meant to be a reliable means to execute tasks, just a quick and easy solution for most needs.
"""
An asynchronous task manager.
This is a simple implementation for background task handing. No guarentees are
provided for task execution.
This was developed in the course of the work don for the victims project and
that version is available at
https://github.com/victims/victims-web/blob/master/src/victims_web/handlers/task.py
@moki9
moki9 / pedantically_commented_playbook.yml
Created October 23, 2015 07:36 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
# Sort a list of dictionary objects by a key - case sensitive
from operator import itemgetter
mylist = sorted(mylist, key=itemgetter('name'))
# Sort a list of dictionary objects by a key - case insensitive
mylist = sorted(mylist, key=lambda k: k['name'].lower())
@moki9
moki9 / raspbian-python3.6.rst
Created June 1, 2017 15:48 — forked from dschep/raspbian-python3.6.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2017, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).
@moki9
moki9 / dynamicCoinChange.py
Created July 10, 2017 11:52 — forked from GabLeRoux/dynamicCoinChange.py
Python Dynamic Coin Change Algorithm
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# T: an array containing the values of the coins
# L: integer wich is the total to give back
# Output: Minimal number of coins needed to make a total of L
def dynamicCoinChange( T, L ):
Opt = [0 for i in range(0, L+1)]
@moki9
moki9 / local-registry.yml
Created August 21, 2017 05:05 — forked from mtpereira/local-registry.yml
Local development with Kubernetes
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
@moki9
moki9 / Makefile
Created October 18, 2017 06:25 — forked from miketheman/Makefile
Django + docker-compose Makefile
CURRENT_DIRECTORY := $(shell pwd)
TESTSCOPE = apps
TESTFLAGS = --with-timer --timer-top-n 10 --keepdb
help:
@echo "Docker Compose Help"
@echo "-----------------------"
@echo ""
@echo "Run tests to ensure current state is good:"
@moki9
moki9 / spacemacs-keybindings
Created November 18, 2017 19:27 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |