Skip to content

Instantly share code, notes, and snippets.

@slaveofcode
slaveofcode / django-launch.json
Last active August 12, 2024 12:55
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 / 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);
}
@bettysteger
bettysteger / croppieDrct.js
Last active July 15, 2018 08:02
Croppie Angular Directive for a simple image cropping. Directive => Component: https://github.com/lpsBetty/angular-croppie
/**
* 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: {
@marulango
marulango / sublime-prefs.json
Created October 8, 2015 16:40
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,
@mogarick
mogarick / index.js
Last active July 4, 2016 09:54
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);
}
@christianroman
christianroman / server.py
Last active June 12, 2021 01:09
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):
@n3wtron
n3wtron / simple_mjpeg_streamer_http_server
Last active July 8, 2024 17:49
Simple Python Motion Jpeg (mjpeg server) from webcam. Using: OpenCV,BaseHTTPServer
#!/usr/bin/python
'''
Author: Igor Maculan - [email protected]
A Simple mjpg stream http server
'''
import cv2
import Image
import threading
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
from SocketServer import ThreadingMixIn
@naxhh
naxhh / Mongo utilities
Created October 29, 2012 12:46
Useful mongo-shell-admin commands
# Login admin
> use admin
> db.auth('user','pass')
#Basic shows
> show dbs
> show collections
> db.collection.getIndexes()
#Create Index
@bennylope
bennylope / LICENSE
Last active August 17, 2023 10:44
Django manage.py file that loads environment variables from a .env file per Honcho/Foreman
Copyright the authors of Honcho and/or Ben Lopatin
Licensed for reuse, modification, and distribution under the terms of the MIT license
@joemccann
joemccann / redis.conf
Created December 6, 2011 21:51
Standard Redis Conf with Authentication
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes