Skip to content

Instantly share code, notes, and snippets.

View geoaxis's full-sized avatar
✔️
Learning

Shahzada Hatim geoaxis

✔️
Learning
View GitHub Profile
@shanselman
shanselman / ohmyposhv3-v2.json
Last active April 25, 2025 05:12
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
# (1) use Alpine Linux for build stage
FROM alpine:3.10.1 as build
# (2) install build dependencies
RUN apk --no-cache add openjdk11
RUN apk --no-cache add maven
# build JDK with less modules
RUN /usr/lib/jvm/default-jvm/bin/jlink \
--compress=2 \
--module-path /usr/lib/jvm/default-jvm/jmods \
@davideicardi
davideicardi / mongo-docker.bash
Last active July 16, 2023 18:18
Running mongodb inside a docker container (with mongodb authentication)
# Create a container from the mongo image,
# run is as a daemon (-d), expose the port 27017 (-p),
# set it to auto start (--restart)
# and with mongo authentication (--auth)
# Image used is https://hub.docker.com/_/mongo/
docker pull mongo
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception)
# add a root user
@gunjanpatel
gunjanpatel / amazon-ec2-ftp.md
Last active October 10, 2023 15:31
amazon ec2 LAMP and FTP installation and setup
@timbuethe
timbuethe / TestTablePagination
Last active September 23, 2023 18:27
JavaFX TableView with Pagination example
import javafx.application.Application;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Pagination;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
@cchacin
cchacin / FizzBuzz.java
Last active April 11, 2020 20:51
Java 8 FizzBuzz
public class FizzBuzz {
static java.util.function.Predicate<Integer> divBy(int n) { return i -> (i % n) == 0;}
static String fizzBuzz(Integer intIn){
String fizz = divBy(3).test(intIn) ? "Fizz" : "";
String buzz = divBy(5).test(intIn) ? "Buzz" : "";
return (fizz.isEmpty() && buzz.isEmpty()) ? intIn.toString() : fizz + buzz;
}
@swilcox
swilcox / _mgraph.md
Last active October 6, 2017 21:08
Multi-graph example widget for Shopify's Dashing dashboard

Multi-graph widget for Dashing

Description

Multi-graph widget for Shopify's dashing to display a comparison style graph (or stacked with a minor modification). Obviously, this is an example that is built heavily on the existing graph widget that is provided with dashing. This widget provides a more clear framework for expanding the graph for multiple series (or nodes) of data. After seeing the example code, it should be fairly easy to expand to 3 or more overlaid graphs (although colors might get tricky). And really, this is just a slightly greater use of the cool rickshaw graphs.

To use this widget: