This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
import platform | |
import os | |
class HardDriveSpaceException(Exception): | |
def __init__(self, value): | |
self.parameter = value | |
def __str__(self): | |
return repr(self.parameter) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from flask import Flask, abort, request, jsonify, g, url_for | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from sqlalchemy.inspection import inspect | |
from flask.ext.httpauth import HTTPBasicAuth | |
from passlib.apps import custom_app_context as pwd_context | |
from itsdangerous import (TimedJSONWebSignatureSerializer | |
as Serializer, BadSignature, SignatureExpired) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
code = """ | |
def f(x): | |
x = x + 1 | |
print("Montamos la función on the fly") | |
return x | |
#print('This is my output.') | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impresora tiquete=new impresora(); | |
tiquete.escribir(“ Esto es una linea “); | |
tiquete.escribir(“Esto es otra linea”); | |
tiquete.escribir(“Otra linea mas”); | |
//Esto es para escribir una linea divisoria | |
tiquete.dividir(); | |
//esto cambia el formato de acuerdo a las especificaciones de epson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start /B wscript "run.vbs" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"python.pythonPath": "${workspaceFolder}\\venv\\Scripts\\python.exe", | |
"terminal.integrated.shellArgs.windows": ["/K", "venv\\Scripts\\activate"], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VMNAME="virtserver" | |
ISO="PATH/TO/ISO" | |
VBOX_PATH="/PATH/TO/VirtualBox VMs/" | |
DIR_VM="$VBOX_PATH""$VMNAME" | |
HDD_VM="$DIR_VM/$VMNAME-disk1.vmdk" | |
echo "Creando directorio que almacenara la VM" | |
mkdir -p "$DIR_VM" | |
VBoxManage createvm -name "$VMNAME" --register --ostype Ubuntu_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import requests | |
import json | |
import socket | |
DDNS_HOST = 'myhost.dyndns.org' | |
CHEKIP_URL = "http://thisisnt.com/api/getRemoteIp.php" | |
DDNS_UPDATE_URL = "https://members.dyndns.com/nic/update" | |
user = "myuser" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import calendar | |
from datetime import datetime | |
def week_of_month(dt): | |
current_month = (dt.year,dt.month) | |
next_month = (dt.year +1,1) if dt.month==12 else (dt.year,dt.month + 1) | |
weeks_month = [] | |
for year,month in [current_month, next_month]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NAME="hello_app" # Name of the application | |
DJANGODIR=/webapps/hello_django/hello # Django project directory | |
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
USER=hello # the user to run as | |
GROUP=webapps # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
NewerOlder