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
/* | |
* MIT License | |
* | |
* Copyright (c) 2023-2024 Fabio Lima | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
# https://askubuntu.com/questions/15832/how-do-i-get-the-cpu-temperature | |
paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) \ | |
| column -s $'\t' -t \ | |
| sed 's/\(.\)..$/.\1°C/' |
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
/** | |
* Returns a Time Sortable ID with millisecond precision. | |
* | |
* Time component: 42 bits (2^42 = ~69 years) | |
* | |
* Random component: 22 bits (2^22 = 4,194,304) | |
* | |
* The time component is the count of milliseconds since 2020-01-01T00:00:00Z. | |
* | |
* Tags: tsid ulid snowflake id-generator generator time sortable sort order id |
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
/* | |
* MIT License | |
* | |
* Copyright (c) 2023 Fabio Lima | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
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
#!/usr/bin/bash | |
# | |
# Records the oudio from your browser and other applications. | |
# | |
# USAGE: | |
# | |
# record-system-output-audio.sh DURATION | |
# | |
# Where DURATION is [<HH>:]<MM>:<SS> or <SS>[s] (read ffmpeg-utils manual) | |
# |
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 SEQUENCE public.global_id_seq; | |
ALTER SEQUENCE public.global_id_seq OWNER TO postgres; | |
CREATE OR REPLACE FUNCTION public.id_generator() | |
RETURNS bigint | |
LANGUAGE 'plpgsql' | |
AS $BODY$ | |
DECLARE | |
our_epoch bigint := 1314220021721; | |
seq_id bigint; |
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
#!/usr/bin/bash | |
# | |
# Removes a block to /etc/hosts. | |
# | |
# USAGE: | |
# | |
# $ block-site-add.sh EXAMPLE.COM | |
# 0.0.0.0 example.com | |
# 0.0.0.0 www.example.com | |
# |
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
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf | |
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf | |
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf | |
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf | |
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf | |
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf | |
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf | |
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf | |
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf | |
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf |
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
// Before | |
@Id | |
@Column(name = "entity_id") | |
@GeneratedValue(generator = "system-uuid") | |
@GenericGenerator(name = "system-uuid", strategy = "uuid2") | |
private String entityId; | |
// After | |
@Id | |
@Column(name = "entity_id") |
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 | |
# | |
# Excecute `worktine.sh` with `xterm`. | |
# | |
# XTerm Options: | |
# | |
# * -bg: fackground color | |
# * -fg: foreground color | |
# * -fa: freeType font-selection pattern | |
# * -fs: font size |
NewerOlder