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 | |
# take care of spaces in filenames | |
SAVEIFS="$IFS" | |
IFS=$(echo -en "\n\b") | |
# requires ghostscript, ionice, zip, jhead & imagemagick/graphicsmagick | |
# do not delete temp directory with temp files | |
DELETE=false | |
# do not up/down-scale images |
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 | |
SAVEIFS="$IFS" | |
IFS=$(echo -en "\n\b") | |
# requires ghostscript, ionice, zip, jhead & imagemagick/graphicsmagick | |
# do not delete temp directory with temp files | |
DELETE=false | |
# default resolution is 150 dpi | |
PDF_RES=150 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="ComicInfo" nillable="true" type="ComicInfo" /> | |
<xs:complexType name="ComicInfo"> | |
<xs:sequence> | |
<xs:element minOccurs="0" maxOccurs="1" default="" name="Title" type="xs:string" /> | |
<xs:element minOccurs="0" maxOccurs="1" default="" name="Series" type="xs:string" /> | |
<xs:element minOccurs="0" maxOccurs="1" default="" name="Number" type="xs:string" /> | |
<xs:element minOccurs="0" maxOccurs="1" default="-1" name="Count" type="xs:int" /> | |
<xs:element minOccurs="0" maxOccurs="1" default="-1" name="Volume" type="xs:int" /> |
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
Verifying my Blockstack ID is secured with the address 1XyKq7bG4o5xTDUJM8xruwvCd1y4Xjehk https://explorer.blockstack.org/address/1XyKq7bG4o5xTDUJM8xruwvCd1y4Xjehk |
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
var https = require('https'); | |
var options = { | |
hostname: 'api.gemini.com', | |
port: 443, | |
method: 'GET', | |
path: '/v1/book/btcusd' | |
}; | |
var rLimit = 10; // number of results |
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
// created from example at http://thejackalofjavascript.com/node-js-design-patterns/ | |
// and using nodejs.org docs | |
var EventEmitter = require('events').EventEmitter; | |
var util = require('util'); | |
function Batter(name) { | |
this.name = name; | |
// initialize properties from EventEmitter on this instance |
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 | |
V=$1 | |
if [ "$V" -eq "$V" ] 2>/dev/null | |
then | |
LEN=$1 | |
else | |
LEN=64 | |
fi | |
echo $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $LEN | head -n 1) |
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
// have to have args npm package | |
// npm install args --save | |
var args = require('args'); | |
// defining command line options | |
var args_options = args.Options.parse([ | |
{ | |
name: 'port', | |
shortName: 'P', | |
type: 'int', |
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
# copy/paste from comment at | |
# https://www.digitalocean.com/community/questions/http-https-redirect-positive-ssl-on-nginx | |
server { | |
listen 80; | |
server_name devly.co www.devly.co; | |
return 301 https://$server_name$request_uri; | |
} | |
server { |
NewerOlder