- SSH to router
uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/override.hosts
echo 'fqdn.example.com 127.0.0.1' >> /etc/override.hosts
/etc/init.d/dnsmasq restart
Should result in
$ nslookup fqdn.example.com
Server: 127.0.0.1
""" | |
Likely not useful to anyone else, but just putting it out there. | |
This script will take a directory of GeoTIFFs and merge them together without issues. | |
This script simply decompresses the files, runs nearblack to remove pseudo-black borders caused by compression, and then uses gdalwarp to stitch the files together. | |
The script is designed to use the minimal amount of disk space possible -- it cleans up each file after decompression and continually merges with a master image. | |
""" | |
import os |
<h2><?php _e( 'Order Notes', 'woocommerce' ); ?></h2> | |
<?php | |
$args = array( | |
'status' => 'approve', | |
'post_id' => $order->id | |
); | |
$comments = get_comments($args); | |
foreach($comments as $comment) : | |
echo $comment->comment_content . '<br />'; |
// Create Base64 Object | |
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r |
uci add_list dhcp.@dnsmasq[0].addnhosts=/etc/override.hosts
echo 'fqdn.example.com 127.0.0.1' >> /etc/override.hosts
/etc/init.d/dnsmasq restart
Should result in
$ nslookup fqdn.example.com
Server: 127.0.0.1
#!/bin/bash | |
# | |
# Batch Time-Lapse creation script. | |
# | |
# This script can be used to speed up, trim, and finally concatenate tens or | |
# even hundreds of video clips, e.g. from a dash cam. You can do other things, | |
# too, but the main things this script does include: | |
# | |
# 1. Copy across and speed up video clips from an input dir to an output dir. | |
# 2. Trim off the first x frames of each of the copied/sped up clips. |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git
#!/bin/sh | |
# Install apt-cacher-ng | |
apt-get install -y apt-cacher-ng | |
# This will be a caching server on local network. Change IP to private or leave listening | |
echo "BindAddress: 0.0.0.0" >> /etc/apt-cacher-ng/acng.conf | |
echo "Port:3142" >> /etc/apt-cacher-ng/acng.conf | |
echo "PidFile: /var/run/apt-cacher-ng/pid" >> /etc/apt-cacher-ng/acng.conf |
class WPDeskNoShippingMessage { | |
/** | |
* Register hooks. | |
*/ | |
public function add_hooks() { | |
add_filter( 'woocommerce_no_shipping_available_html', [ $this, 'change_message' ] ); | |
add_filter( 'woocommerce_cart_no_shipping_available_html', [ $this, 'change_message' ] ); | |
} | |
/** |
let liturgyToday = {}; | |
$.getJSON('https://www.johnromanodorazio.com/LiturgicalCalendar/LitCalEngine.php?diocesanpreset=DIOCESIDIROMA',function(data){ | |
for(const [key,entry] of Object.entries(data.LitCal)){ | |
let entryDate = new Date(entry.date * 1000); | |
if(entryDate.getUTCMonth() == new Date().getMonth() && entryDate.getUTCDate() == new Date().getDate()){ | |
liturgyToday[key] = entry; | |
} | |
} | |
}); |