- Adopted from: https://stubby4j.com/docs/admin_portal.html
- Inspired by Swagger API docs style & structure: https://petstore.swagger.io/#/pet
If you, like me, resent every dollar spent on commercial PDF tools,
you might want to know how to change the text content of a PDF without
having to pay for Adobe Acrobat or another PDF tool. I didn't see an
obvious open-source tool that lets you dig into PDF internals, but I
did discover a few useful facts about how PDFs are structured that
I think may prove useful to others (or myself) in the future. They
are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.
This file contains 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 | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
This file contains 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
require 'fileutils' | |
namespace :html2sprockets do | |
desc "Setup env for gem creation" | |
task :env do | |
@gemname = ENV.fetch('NAME') | |
@gemdir = File.join(ENV.fetch('GEMDIR', 'vendor/gems'), @gemname) | |
@asset_dst_path = File.join(@gemdir, ENV.fetch('DST', 'vendor/assets')) | |
@asset_src_paths = ENV.fetch('SRC').each_line.collect(&:strip) |
This file contains 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
@-webkit-keyframes u-progress-stripes { | |
from { background-position: 0 0 } | |
to { background-position: 40px 0 } | |
} | |
@-moz-keyframes u-progress-stripes { | |
from { background-position: 0 0 } | |
to { background-position: 40px 0 } | |
} | |
@keyframes u-progress-stripes { | |
from { background-position: 0 0 } |
This file contains 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
Create a file with this: | |
#!/bin/bash | |
oldtext=$1 | |
newtext=$2 | |
pdffile=$3 | |
cp $pdffile $pdffile.bak | |
pdftk $pdffile output $pdffile.tmp uncompress |
This file contains 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
create fdf | |
pdftk form.pdf generate_fdf output data.fdf | |
fill form | |
pdftk form.pdf fill_form data.fdf output form_with_data.pdf |
This file contains 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 | |
## | |
# Backup Server to S3 script | |
# | |
# Creates a local cached backup of the source folder using rsync and then | |
# synchronises that with Amazon S3. | |
# | |
# | |
# It is assumed you have rsync installed on the server. |
This file contains 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
//Based on http://www.samliew.com/icval/ | |
function validateNRIC(str) { | |
if (str.length != 9) | |
return false; | |
str = str.toUpperCase(); | |
var i, | |
icArray = []; | |
for(i = 0; i < 9; i++) { |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
NewerOlder