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
func DirExists(path string) (bool, error) { | |
_, err := os.Stat(path) | |
if err == nil { | |
return true, nil | |
} else if os.IsNotExist(err) { | |
return false, nil | |
} | |
return false, err | |
} |
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 new note. | |
new_daily_note() { | |
cd ~/Documents/DailyNotes | |
currentDate=$(date '+%Y-%m-%d') | |
currentTime=$(date '+%H:%M') | |
fileName="${currentDate}.todo" | |
if [ -f "$fileName" ]; then | |
echo "Daily note file ($fileName) already exists." | |
else | |
cp _new.todo $fileName |
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
# Configuration. | |
/.htaccess | |
/.htaccess_lscachebak_* | |
/wp-config.php | |
/sitemap.xml | |
/sitemap.xml.gz | |
# Files in the root. | |
*.jpg |
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
# Run the updates. | |
alias update="sudo -- sh -c 'apt-get update; apt-get upgrade -y --allow-unauthenticated; apt-get dist-upgrade -y --allow-unauthenticated; apt-get autoremov$ | |
# Colors! | |
if [ "$TERM" != "dumb" ]; then | |
[ -e "$HOME/.dir_colors" ] && | |
DIR_COLORS="$HOME/.dir_colors" [ -e "$DIR_COLORS" ] || | |
DIR_COLORS="" | |
eval "`dircolors -b $DIR_COLORS`" | |
alias ls='ls --color=auto' |
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
# Ignore custom settings. | |
sites/default/settings.local.php | |
# phpStorm settings. | |
/.idea/ | |
# Ignore paths that contain user-generated content. | |
/sites/*/files | |
/sites/*/private | |
/files/* |
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
# Ignore directories generated by Composer | |
/drush/contrib/ | |
/vendor/ | |
/web/core/ | |
/web/modules/contrib/ | |
/web/themes/contrib/ | |
/web/profiles/contrib/ | |
/web/libraries/ | |
# Ignore sensitive information |
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 | |
/** | |
* @file | |
* Development settings. | |
* | |
* Created by: Aram Boyajyan | |
* https://www.aram.cz/ | |
*/ |
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 () { | |
'use strict'; | |
var selected = $([]), offset = {top: 0, left: 0}; | |
$("#container").selectable(); | |
$("#container div").draggable({ | |
snap : true, | |
start: function () { | |
if (!$(this).is(".ui-selected")) { | |
$(".ui-selected").removeClass("ui-selected"); | |
} |
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
core = 8.x | |
api = 2 | |
projects[] = drupal | |
projects[level1][type] = profile | |
projects[level1][download][type] = git | |
projects[level1][download][url] = https://github.com/aramboyajyan/d8level1 | |
projects[seven_improved][type] = theme | |
projects[seven_improved][download][type] = git |
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 format_duration($seconds) { | |
$time = round($seconds); | |
// Check if video length is longer than 1 hour. If not, we will skip the hour | |
// numbers. | |
if ($seconds > 60 * 60) { | |
$formatted = sprintf('%02d:%02d:%02d', ($time / 3600), ($time / 60 % 60), $time % 60); | |
} | |
else { | |
$formatted = sprintf('%02d:%02d', ($time / 60 % 60), $time % 60); |
NewerOlder