- Clone this Gist.
- For card sizes other than A5, edit the
size
value in@page
, and theheight
andwidth
properties ofbody
. - Add contents to each face. The simplest approach is to add an image called
front.png
of the same dimensions as the card. - Generate a PDF from the HTML + CSS. If using Prince, it's as simple as
prince index.html card.pdf
. - Take the PDF to a printer, and ask them to print as many copies as you need.
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
from extras.reports import Report | |
from dcim.models import Device | |
from virtualization.models import VirtualMachine | |
from ipam.constants import * | |
from ipam.models import IPAddress, Prefix | |
LOOPBACK_ROLES = [ | |
IPADDRESS_ROLE_LOOPBACK, | |
IPADDRESS_ROLE_ANYCAST, | |
IPADDRESS_ROLE_VIP, |
Long time network engineer, did some perl a long time ago and am liking python pretty well but the pynetbox documentation is badly lacking IMO. If I were a python wizard I'm sure it would all be obvious but I'm not and it's really frustrating that more example weren't provided.
Many of the following examples were cadged from various places on the interwebs and HAVE NOT BEEN TESTED.
import pynetbox
NETBOX = 'https://netbox.fq.dn/'
nb = pynetbox.api(NETBOX, get_token('nb'))
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 | |
# | |
# This script get all Mysql database size (except the internal one) and display it as a Json | |
# that can be used to Zabbix Discovery Rules. | |
# | |
# This simple script was created by RafaelFoster: rafaelgfoster (at) gmail (dot) com | |
# | |
# Json Output: {"data": [ { "{#DBNAME}" : "database_name","{#DBSIZE}":"size_in_bytes"},{"{#DBNAME}":"database_name2","{#DBSIZE}":"size_in_bytes"} ] } | |
cd $HOME |
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
<?php | |
/** | |
* versionCleanX | |
* | |
* @author Scott Pronych, September 27, 2013 | |
* | |
* DESCRIPTION | |
* | |
* For use with VersionX to delete old content | |
* |
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 | |
#настройки для подключения к БД | |
USER="login" #логин для подключения к БД | |
PASS="pass" #пароль для подключения к БД | |
DB_NAME="db_name" #имя БД | |
#запускать для сохранения бэкапа | |
#переходим в директорию выше корня сайта | |
cd ~ |
- Download & Install Sublime Text 3.2.2 Build 3211
- Visit https://hexed.it/
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
G91 ;Relative positioning | |
G0 E-2 F2700 ;Retract a bit | |
G0 E-2 Z0.2 F2400 ;Retract and raise Z | |
G0 X5 Y5 F3000 ;Wipe out | |
G0 Z10 ;Raise Z more | |
G90 ;Absolute positionning | |
G0 Y310 ;Present print | |
M106 S0 ;Turn-off fan |
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 | |
# | |
## -----------------------------=[ WARNING ]=-------------------------------- ## | |
# | |
# This script is now woefully out of date due to which accounts ESXi allows to | |
# ssh into the box as well as sticky folders/file flags. | |
# I've since ported the whole thing to python with a lot of bells and whistles | |
# and if i get around to making it public, i'll put a link here. | |
# | |
## -------------------------------=[ Info ]=--------------------------------- ## |
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
<?php | |
$csvData = file_get_contents($fileName); | |
$lines = explode(PHP_EOL, $csvData); | |
$array = array(); | |
foreach ($lines as $line) { | |
$array[] = str_getcsv($line); | |
} | |
print_r($array); |
NewerOlder