This file contains hidden or 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 up(){ | |
if [[ $1 != "" ]] && [[ $1 -lt 1 ]] ; then echo "Argument must be a positive integer."; fi | |
for n in $(seq 1 $1); do dots+="../"; done | |
cd $dots | |
n="" | |
dots="" | |
} |
This file contains hidden or 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 | |
# Shell prompt based on the Solarized Dark theme. | |
# Screenshot: http://i.imgur.com/EkEtphC.png | |
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. | |
# vim: set filetype=sh : | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM='gnome-256color'; | |
elif infocmp rxvt-unicode-256color >/dev/null 2>&1; then |
This file contains hidden or 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
package sample | |
import java.time.DayOfWeek.* | |
import java.time.LocalDate | |
class DayOfWeekCalculator | |
fun main() { | |
val date = LocalDate.now() | |
println("The day of week is ${calculateDayOfWeek(date)} for $date") |
This file contains hidden or 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 | |
if [[ $# -eq 0 ]] ; then | |
echo "Please provide file path"; | |
exit 1; | |
fi | |
touch CAT_TO_PYGMENTIZE_TEMP; | |
/usr/bin/cat $1 >> CAT_TO_PYGMENTIZE_TEMP 2> /dev/null; |
This file contains hidden or 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
# Final plan to do this, | |
""" | |
# Define a 10*8 matrix (call it the game_play) | |
# Give each character a digit, say the following: // In order to perform some mathematical operations. | |
m = 5, w = 4, s = 3, b = 2, g = 1 | |
# | |
# Start from a specific point in the grid, find all of it's associated paths. | |
# check that it's neither in the open_list nor the closed_set, if it does `continue` to next path. | |
# If a path is valid add it to the open_list,otherwise through it in the closed_set. | |
// A path is valid if it contains no single mine // |