Skip to content

Instantly share code, notes, and snippets.

@ncl0w
ncl0w / server.py
Created November 7, 2017 16:20 — forked from christianroman/server.py
Rompiendo Captcha de CURP usando Python, OpenCV, Tesseract OCR y Tornado
import tornado.ioloop
import tornado.web
import urllib2 as urllib
from PIL import Image
from cStringIO import StringIO
import numpy as np
import tesserwrap
import cv2
class MainHandler(tornado.web.RequestHandler):
@ncl0w
ncl0w / manage.py
Created October 12, 2017 15:26 — forked from bennylope/LICENSE
Django manage.py file that loads environment variables from a .env file per Honcho/Foreman
#!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
@ncl0w
ncl0w / Mongo utilities
Created June 27, 2017 00:20 — forked from naxhh/Mongo utilities
Useful mongo-shell-admin commands
# Login admin
> use admin
> db.auth('user','pass')
#Basic shows
> show dbs
> show collections
> db.collection.getIndexes()
#Create Index
@ncl0w
ncl0w / django-launch.json
Created June 12, 2017 23:47 — forked from slaveofcode/django-launch.json
Sample Django Configuration launch.json VSCode (Visual Studio Code)
{
"version": "0.2.0",
"configurations": [
{
"name": "Django",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${workspaceRoot}/venv/bin/python3.4",
"program": "${workspaceRoot}/manage.py",
@ncl0w
ncl0w / django-launch.json
Created June 12, 2017 23:47 — forked from slaveofcode/django-launch.json
Sample Django Configuration launch.json VSCode (Visual Studio Code)
{
"version": "0.2.0",
"configurations": [
{
"name": "Django",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"pythonPath": "${workspaceRoot}/venv/bin/python3.4",
"program": "${workspaceRoot}/manage.py",
/**
* Use Croppie for a simple image cropping.
* @see https://github.com/Foliotek/Croppie
* @example
* <lh-croppie src="cropped.source" ng-model="cropped.image"></lh-croppie>
*/
angular.module('lingohubApp').directive('lhCroppie', function () {
return {
restrict: 'E',
scope: {
@ncl0w
ncl0w / index.js
Created April 21, 2016 16:43 — forked from mogarick/index.js
Wrapper / Facade to expose pickadate components for using out of the box in Browserify by using a simple require('pickadate') (No need to assign to a variable)
//This code is a simple adaptation from the index.js file in CryptoJS node module
(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require('./picker'), require('./picker.date'), require('./picker.time'));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(['./picker','./picker.date', './picker.time'], factory);
}
@ncl0w
ncl0w / readme.md
Created April 5, 2016 20:10 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"

npm adduser

@ncl0w
ncl0w / sublime-prefs.json
Created March 1, 2016 22:05 — forked from marulango/sublime-prefs.json
Por si a alguien le interesa: Mi configuración de ST3
{
"bold_folder_labels": true,
"color_scheme": "Packages/Base16 Color Schemes/base16-ocean.dark.tmTheme",
"draw_white_space": "all",
"font_face": "Source Code Pro",
"font_size": 14,
"highlight_line": true,
"indent_to_bracket": true,
"line_padding_bottom": 3,
"line_padding_top": 3,