Skip to content

Instantly share code, notes, and snippets.

View sigilioso's full-sized avatar

Christian sigilioso

View GitHub Profile
@shnjp
shnjp / tunnel.py
Created March 5, 2011 06:29
ssh tunnel for Fabric
"""
Fabric tunneling utilities
by [email protected]
class ForwardServer and relates things are refere Robey Pointer's paramiko example.
(http://bazaar.launchpad.net/~robey/paramiko/trunk/annotate/head%3A/demos/forward.py)
usage::
with make_tunnel('[email protected]:10022') as t:
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active October 29, 2024 21:43
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@sigilioso
sigilioso / button_example.css
Created April 10, 2012 16:05
button style example
/*<input class="button" type="submit" value="test">*/
.button {
margin-top: 10px;
padding: 2px;
border: 1px solid #006699;
border-radius: 5px 5px 5px 5px;
color: #006699;
font-weight: bold;
text-align: center;
@copitux
copitux / Doc.rst
Created September 24, 2012 22:20
Django, Django forms and Django rest framework: Payload validation

Django request flow

-------------------------------                         ------------------ Django --------------------
| Browser: GET /udo/contact/2 |    === wsgi/fcgi ===>   | 1. Asks OS for DJANGO_SETTINGS_MODULE      |
-------------------------------                         | 2. Build Request (from wsgi/fcgi callback) |
                                                        | 3. Get settings.ROOT_URLCONF module        |
                                                        | 4. Resolve URL/view from request.path      | # url(r'^udo/contact/(?P<id>\w+)', view, name='url-identifier')
                                                        | 5. Apply request middlewares               | # settings.MIDDLEWARE_CLASSES
@ealogar
ealogar / gist:6698348
Created September 25, 2013 11:28
tutorial of pymongo: - Recommendations of use - Examples - Useful readings
#-*- coding: utf-8 -*-
u"""
MOD: pymongo
"""
import pymongo
#===============================================================================
@mattmc3
mattmc3 / tasks.json
Created April 6, 2017 00:44
VSCode tasks for running a Makefile
// Makefile
// ${workspaceRoot} the path of the folder opened in VS Code
// ${file} the current opened file
// ${fileBasename} the current opened file's basename
// ${fileDirname} the current opened file's dirname
// ${fileExtname} the current opened file's extension
// ${cwd} the task runner's current working directory on startup
{
"version": "0.1.0",
"command": "bash",
@savsgio
savsgio / vscode_auto_activate_python_virtualenv.sh
Last active March 18, 2021 13:01
Auto-activate python virtualenv in VSCode Integrated Terminal
## File: ~/.bashrc
## Your virtualenv is in /home/.virtualenvs/
# Auto-activate python virtualenv
if [ ! -z $PYTHONVIRTUALENV ]; then
source /home/.virtualenvs/$PYTHONVIRTUALENV/bin/activate
fi
## File: .vscode/settings.json