A Pen by Dylan Hildenbrand on CodePen.
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
<?php | |
function one($a) { | |
$count = count($a); | |
$total = 0; | |
for ($i=0; $i < $count; $i++) { | |
$total = $total + $a[$i]; | |
} | |
echo $total; | |
} |
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 espeak import espeak | |
import time | |
while True: | |
response = input(">> ") | |
espeak.synth(response) | |
time.sleep(1) |
Use the buttons on the top of the screen to add different shapes with different colors, rotate the shapes, or remove them. Build whatever you can imagine.
A Pen by Dylan Hildenbrand on CodePen.
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
<?php | |
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
// AJAX request to disable days on calendar in checkout | |
add_action( 'wp_ajax_company_holidays', 'company_holidays_callback' ); | |
add_action( 'wp_ajax_nopriv_company_holidays', 'company_holidays_callback' ); | |
function company_holidays_callback() { | |
$holidays = []; |
I hereby claim:
- I am dilden on github.
- I am dilden (https://keybase.io/dilden) on keybase.
- I have a public key whose fingerprint is 69DD D9DC 99EE E5FE 46CC B181 99F3 66A4 E861 BFA1
To claim this, I am signing this object:
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
alias storjstart='storjshare start -c ~/.config/storjshare/configs/STORJ_NODE_ID_HERE.json' | |
alias storjstop='storjshare stop -i STORJ_NODE_ID_HERE' | |
alias storjstat='storjshare status' | |
# mkdir ~/storjstuff and place bash script there | |
alias storjupdate='cd ~/storjstuff/ && ./storjupdate.sh && cd -' |
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
function factorial(n) { | |
if(n > 0) { | |
return n * factorial(n - 1); | |
} | |
else return 1; | |
} | |
console.log(factorial(4)); | |
console.log(factorial(5)); | |
console.log(factorial(6)); |
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/sh | |
THEDATE=`date +%d%m%y%H%M` | |
CONTAINER_PATH="/var/lib/vz/dump/" | |
#MEDIA_PATH="/ mnt/shared/Media" | |
LOCAL_BACKUP_PATH="/media/backups/" | |
# Copy LXC backups (that are < 2 days old) from host to mounted drive | |
find ${CONTAINER_PATH} -name vzdump-lxc-*.tar.gz -mtime -2 -exec cp {} ${LOCAL_BACKUP_PATH} \; |
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/sh | |
THEDATE=`date +%d%m%y%H%M` | |
MEDIA_PATH="/mnt/shared/Media/" | |
LOCAL_BACKUP_PATH="/media/backups/Media/" | |
# Backup shared media | |
rsync -r ${MEDIA_PATH} ${LOCAL_BACKUP_PATH} | |
if [ "$?" -eq "0" ] | |
then |
OlderNewer