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 dec-to-hex() { | |
echo "ibase=10;obase=16;$1" | bc | |
} | |
function dec-to-bin() { | |
echo "ibase=10;obase=2;$1" | bc | |
} | |
function hex-to-dec() { | |
echo "ibase=16;obase=A;$1" | bc |
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
diff --git a/makepkg-original b/makepkg | |
index 2fe769a..ec4963c 100755 | |
--- a/makepkg-original | |
+++ b/makepkg | |
@@ -225,13 +225,6 @@ run_pacman() { | |
else | |
cmd=("$PACMAN_PATH" "$@") | |
fi | |
- if [[ $1 != -@(T|Q)*([[:alpha:]]) ]]; then | |
- if type -p sudo >/dev/null; then |
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 | |
DB=$1 | |
COLLECTIONS=$(mongo localhost:27017/$DB --quiet --eval "db.getCollectionNames()" | tr -d '\[\]\"[:space:]' | tr ',' ' ') | |
for collection in $COLLECTIONS; do | |
echo "Exporting $DB/$collection ..." | |
mongoexport -d $DB -c $collection -o $collection.json | |
done |
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
public class HomeController : Controller | |
{ | |
public async Task<string> RenderViewComponent(string viewComponent, object args) | |
{ | |
var sp = HttpContext.RequestServices; | |
var helper = new DefaultViewComponentHelper( | |
sp.GetRequiredService<IViewComponentDescriptorCollectionProvider>(), | |
HtmlEncoder.Default, | |
sp.GetRequiredService<IViewComponentSelector>(), |
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
public static double PlotFromHighToLow(double highTide, double lowTide, double distance, double at) | |
{ | |
var halfAmplitude = Math.Abs(highTide - lowTide) / 2; | |
var center = halfAmplitude + lowTide; | |
var y = halfAmplitude * Math.Sin(((Math.PI / (distance)) * (at + (distance / 2)))) + center; | |
return y; | |
} | |
public static double PlotFromLowToHide(double lowTide, double highTide, double distance, double at) |
OlderNewer