Skip to content

Instantly share code, notes, and snippets.

@hyperupcall
hyperupcall / settings.jsonc
Last active May 13, 2024 22:21
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@skvithalani
skvithalani / standalone.xml
Last active October 26, 2021 23:33
JBoss wildfly, keycloak logs in json format, along with reading the log file location from environment variable
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:9.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
@rkbalgi
rkbalgi / gist:183a113e946dd9f8360e774dcf17a3db
Last active March 2, 2022 19:12
JDBC_PING with keycloak and postgresql on AWS Fargate
In your effort of implementing standalone-ha with keycloak postgresql using JDBC_PING you will stumble upon many sites that define
the table structure for jgroupsping and the right one goes like this -
CREATE TABLE IF NOT EXISTS JGROUPSPING (
own_addr varchar(200) NOT NULL,
cluster_name varchar(200) NOT NULL,
ping_data BYTEA,
constraint PK_JGROUPSPING PRIMARY KEY (own_addr, cluster_name)
);
@jithurjacob
jithurjacob / Udemy_RemainingTime_Finder.js
Last active March 4, 2024 16:37
Script to find Udemy Course remaining time
//credits - https://greasyfork.org/en/scripts/28295-udemy-show-section-time
// greasyfonrk was throwing me an error so I created this gist
(function() {
$.getScript("https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012", function(){
// waits for the cards to be loaded
waitForKeyElements(selectors.sectionCard, run, true);
});
var selectors = {
sectionCard: 'curriculum-navigation-section',
@douglasrizzo
douglasrizzo / tf_obj_tutorial.md
Last active November 15, 2023 22:36
TensorFlow Object Detection Model Training
@wojteklu
wojteklu / clean_code.md
Last active May 20, 2024 18:19
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@btroncone
btroncone / rxjs_operators_by_example.md
Last active July 16, 2023 14:57
RxJS 5 Operators By Example
@Yimiprod
Yimiprod / difference.js
Last active May 10, 2024 16:49
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {