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
<!-- country codes (ISO 3166) and Dial codes. --> | |
<select name="countryCode" id=""> | |
<option data-countryCode="GB" value="44" Selected>UK (+44)</option> | |
<option data-countryCode="US" value="1">USA (+1)</option> | |
<optgroup label="Other countries"> | |
<option data-countryCode="DZ" value="213">Algeria (+213)</option> | |
<option data-countryCode="AD" value="376">Andorra (+376)</option> | |
<option data-countryCode="AO" value="244">Angola (+244)</option> | |
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option> | |
<option data-countryCode="AG" value="1268">Antigua & Barbuda (+1268)</option> |
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
<html> | |
<head> | |
<style> | |
*{ | |
font-family: arial; | |
font-size: 11px; | |
} | |
table{ | |
border-collapse: collapse; | |
border: 1px solid silver; |
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 | |
# Use FIND over TREE when you want to exclude folders like node_modules | |
find /path/to/folder -type d -name "node_modules" -prune -o -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' |
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 | |
tree /path/to/folder -L 2 |
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
// Import required modules | |
const sqlite3 = require('sqlite3').verbose(); // SQLite3 module for database operations | |
const fs = require('fs').promises; // File System module for file operations | |
const { promisify } = require('util'); // Util module to convert callback-based functions to promises | |
/** | |
* Generates Markdown files from data in the SQLite database and sets their metadata. | |
* The Markdown files are organized in folders based on the "posted" date from the database. | |
*/ | |
(async () => { |
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 | |
# This script is provided "as is" and without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the author be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the script or the use or other dealings in the script. Use at your own risk. | |
# This is a bash script that checks the HTTP response of a list of top-level domain names | |
# every 1 minute. If a domain returns an HTTP status code other than 200 OK, the script | |
# sends a callback to a specified URL with the name of the domain that failed. | |
# | |
# The list of domains and callback URL can be edited | |
# | |
# You could also use CRON to ensure this file is alway running e.g. |
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
http { | |
... | |
server { | |
listen 80; | |
server_name example.com; | |
root /var/www/exmaple.com/www/; | |
index index.cfm; | |
set $lucee_context "example.com"; | |
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
<html> | |
<head> | |
<title>Look at WebSQL</title> | |
<script> | |
// Through the code below remember essentialy there are just 3 core methods we tend to use | |
// openDatabase | |
// transaction | |
// executeSql | |
// Opening a connection |
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
MY_IP=127.0.0.1 | |
#Ubuntu | |
#MY_IP=$(wget -qO- icanhazip.com) | |
#MAC | |
#MY_IP=$(ifconfig en0 | grep "inet 1" | awk '/inet/ { print $2 } ') | |
echo Current IP: $MY_IP |
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
# From Andy Jarretts post: | |
# http://www.andyjarrett.co.uk/2016/08/02/secured-bash-script-to-backup-a-mysql-rds-dump-to-s3/ | |
#!/bin/bash | |
SQLDUMP="$(date +'%Y%m%d%H%M').sql.gz" | |
echo "Creating backup of database to $SQLDUMP" | |
mysqldump --login-path=local --databases YourDatabaseName | gzip -9 > $SQLDUMP | |
echo "Dump Zipped up" |
NewerOlder