Skip to content

Instantly share code, notes, and snippets.

View benjaminkomen's full-sized avatar

Benjamin Komen benjaminkomen

View GitHub Profile
@CMYanko
CMYanko / ng_sast_scan.yml
Last active March 16, 2021 14:50
Java / Maven Build
---
# This workflow integrates ShiftLeft NG SAST with GitHub
# Visit https://docs.shiftleft.io for help
name: ShiftLeft
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
@Kyborg2011
Kyborg2011 / repaire-damaged-ext-drive.sh
Created January 22, 2020 11:28
Repairing damaged external drive (flash drive) on OS X
# If "Disk Utility" can't erase a demaged disk and throw errors, like these:
# a) "-69888: Couldn't unmount disk";
# b) "Couldn't modify partition map".
# You can repair disk (if it is damaged partially, just by a program error, while changing partition map of a disk in) by
# FULL ERASING OF A DISK - you can do that ONLY in A COMMAND LINE, using "diskutil" command (on OS X)
# 1. Firstly you must get path of a drive in a system, like this:
diskutil list
# Than complete erasing of a disk:
diskutil eraseDisk free EMPTY /dev/disk4
@ahmetb
ahmetb / gcrgc.sh
Last active March 10, 2025 21:51
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@kaievns
kaievns / gist:acb23149b66418ba340c
Created July 29, 2014 00:44
How to populate PostgreSQL with dummy data
CREATE TABLE t_random AS SELECT s, md5(random()::text) FROM generate_Series(1,5) s;
INSERT INTO t_random VALUES (generate_series(1,1000000000), md5(random()::text));
SELECT pg_size_pretty(pg_relation_size('t_random'));