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
#!/usr/bin/env bash | |
#----- Functions ----- | |
divide() { | |
echo $(( $(($1 * 100)) / $2)) | |
} | |
multipleOfFour() { | |
result=$(divide $1 2) | |
[[ ${result#*0} == *0* ]] | |
} |
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
#!/usr/bin/env bash | |
#This script asks the user to provide a number and then compares that number to the numbers in an array | |
array=(1 2 3 4 5 6 7 8 9 10 11 12 13 14) | |
otherArray=() | |
echo please provide a number to compare | |
read number | |
for ((i=0; i<${#array[@]}; i++)); do |
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
#!/usr/bin/env bash | |
# This script asks the user for a number and then provides the user with | |
# all even divisors for it | |
#----- functions ----- | |
evenDivision() { | |
local result=$(( $((100 * $1)) / $2)) | |
[[ "${result#*0}" == 0 ]] | |
} |
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
#!/usr/bin/env perl | |
# This is a short script to play rock paper scissors | |
use strict; | |
use warnings; | |
my @rps = qw(rock paper scissors); | |
my %weakness = (rock => "paper", paper => "scissors", scissors => "rock"); | |
my $score = 0; | |
my $npcscore = 0; |
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
#!/usr/bin/env bash | |
# | |
# image_sorter.sh | |
# Copyright (C) 2017 Hugo | |
# | |
# Distributed under terms of the MIT license. | |
# | |
# This script will sort the image and video files from an android phone by date by placing them in directories | |
# according to the dates that can be extracted from the filename. The filenames of the images must be structured | |
# as follows: yyyymmdd_HHMMSS.jpg or yyyymmdd_HHMMSS.mp4 (other extentions can be added easily) |
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
{"lastUpload":"2017-06-03T20:54:54.028Z","extensionVersion":"v2.8.1"} |
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
{"lastUpload":"2017-06-03T21:04:31.484Z","extensionVersion":"v2.8.1"} |
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
// cmd: cat dikkie.json | POST -sS "http://127.0.0.1:5984/dikkie/_bulk_docs" -c "application/json" | |
{ | |
"docs": [ | |
{ | |
"Voornaam": "Sander", | |
"id": 7064, | |
"Achternaam": "Lauridsen", | |
"Geboortedatum": "1-nov-76", | |
"Straat": "Taylorweg 70", | |
"Postcode": "5466AE", |
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 nl.hva.dmci.ict.se.datastructures.fibonacci; | |
import java.math.BigInteger; | |
import java.util.function.Consumer; | |
import edu.princeton.cs.algs4.Stopwatch; | |
public class FastFibonacci { | |
static double timeStart; |
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
#! /usr/bin/env bash | |
# | |
# replaceslash.sh | |
# Copyright (C) 2017 hugo <hugo@supersudomachine> | |
# | |
# Distributed under terms of the MIT license. | |
# | |
[ -f NClass.build ] || ( | |
echo failed to find the build file, execute this script in the root of the NClass project && exit 1 |
OlderNewer