Skip to content

Instantly share code, notes, and snippets.

View regevbr's full-sized avatar
👨‍💻
Coding...

Regev Brody regevbr

👨‍💻
Coding...
View GitHub Profile
@alexdelprete
alexdelprete / nuki_card_callback.yaml
Last active October 14, 2022 17:46
Nuki Card v11.0
######################################
# #
# -= Nuki Card v11.0 =- #
# #
# by #
# @alexdelprete #
# #
# contributions from: #
# @spokin #
# #
@metal3d
metal3d / Info
Created June 16, 2021 06:47
Countries coordinates with longitude and latitude
Based on https://gist.github.com/tadast/8827699:
- remove duplicates
- striped and no unecessary double quotes
- floating point values instead of strings
@hui-zheng
hui-zheng / BQ_partition_dedup.sql
Last active May 26, 2023 14:14
This list provides BigQuery SQL templates that remove duplicates for large size timestamp partitioned table (using MERGE statement) and for small size table or a non-partition table (Using REPLACE TABLE statement)
-- WARNING: back up the table before this operation
-- FOR large size timestamp partitioned table
-- -------------------------------------------
-- -- To de-duplicate rows of a given range of a partition table, using surrage_key as unique id
-- -------------------------------------------
DECLARE dt_start DEFAULT TIMESTAMP("2019-09-17T00:00:00", "America/Los_Angeles") ;
DECLARE dt_end DEFAULT TIMESTAMP("2019-09-22T00:00:00", "America/Los_Angeles");
MERGE INTO `gcp_project`.`data_set`.`the_table` AS INTERNAL_DEST
@kichik
kichik / KeepDbStopped.yml
Last active February 9, 2024 15:31
CloudFormation template that stops RDS from automatically starting back up
# aws cloudformation deploy --template-file KeepDbStopped.yml --stack-name stop-db --capabilities CAPABILITY_IAM --parameter-overrides DB=arn:aws:rds:us-east-1:XXX:db:XXX
Description: Automatically stop RDS instance every time it turns on due to exceeding the maximum allowed time being stopped
Parameters:
DB:
Description: ARN of database that needs to be stopped
Type: String
AllowedPattern: arn:aws:rds:[a-z0-9\-]+:[0-9]+:db:[^:]*
MaxStartupTime:
Description: Maximum number of minutes to wait between database is automatically started and the time it's ready to be shut down. Extend this limit if your database takes a long time to boot up.
Type: Number
@trusktr
trusktr / image-grid.md
Last active October 14, 2024 17:14
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm
@ravibhure
ravibhure / git_rebase.md
Last active November 9, 2024 05:19
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@tadast
tadast / countries_codes_and_coordinates.csv
Last active November 15, 2024 22:02
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Åland Islands AX ALA 248 60.116667 19.9
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
@ksafranski
ksafranski / Common-Currency.json
Last active November 15, 2024 10:05
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@glennblock
glennblock / fork forced sync
Created March 4, 2012 19:27
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master