Skip to content

Instantly share code, notes, and snippets.

View ricardocunha's full-sized avatar
🏠
Working from home

Ricardo Cunha ricardocunha

🏠
Working from home
View GitHub Profile
@asoorm
asoorm / hmac-postman-pre-request-script.js
Last active February 14, 2024 17:10
Postman pre-request script to sign http requests with a HMAC shared secret
/* CHANGE THIS STUFF */
const KEY_ID = "61eaf3e25ebd3aa2f8d2958953bc5cc49e754195ac07e70c4f6d8fb6";
const HMAC_SECRET = "NWU0MzQ0ZjZmY2JiNGU4N2I1NmEyZjJlYTRlOTE0YzI=";
const SIGN_REQUEST_TARGET = true;
const SIGN_REQUEST_DATE = true;
const HEADERS_TO_SIGN = ["x-test-1", "x-test-2"];
const SIGNING_ALGORITHM = "hmac-sha512"; // supported algorithms: hmac-sha1, hmac-sha256, hmac-sha384, hmac-sha512
/* DO NOT CHANGE BELOW THIS LINE */
@hereismari
hereismari / msi-gtx1060-ubuntu-18.04-deeplearning.md
Last active July 1, 2024 14:42
Setting up a MSI laptop with GPU (gtx1060), Installing Ubuntu 18.04, CUDA, CDNN, Pytorch and TensorFlow
@itsbalamurali
itsbalamurali / db_2_structs.go
Created January 6, 2018 10:18
Reverse your MySQL Schema to Golang Structs
package main
import (
"fmt"
"log"
"os"
"strconv"
"github.com/Shelnutt2/db2struct"
"github.com/jinzhu/gorm"
@leonardofed
leonardofed / README.md
Last active July 19, 2024 17:51
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@kdzwinel
kdzwinel / main.js
Last active June 7, 2024 08:08
List all undefined CSS classes
/*
This script attempts to identify all CSS classes mentioned in HTML but not defined in the stylesheets.
In order to use it, just run it in the DevTools console (or add it to DevTools Snippets and run it from there).
Note that this script requires browser to support `fetch` and some ES6 features (fat arrow, Promises, Array.from, Set). You can transpile it to ES5 here: https://babeljs.io/repl/ .
Known limitations:
- it won't be able to take into account some external stylesheets (if CORS isn't set up)
- it will produce false negatives for classes that are mentioned in the comments.
@n3dst4
n3dst4 / ConEmu Git Bash.md
Last active July 22, 2024 07:13
My ConEmu / Cmder git bash task config
  1. Open Conemu

  2. Open Settings -> Tasks or go to new tab button -> Setup tasks.

  3. Click + to add a new task

  4. Enter the name as Git Bash or whatever you like

  5. Task parameters:

     /icon "C:\Program Files (x86)\Git\etc\git.ico" /dir "C:\_git"
    
  6. Command:

@glw
glw / load_shp_to_AWS
Last active June 21, 2024 18:52
load shapefile into Amazon RDS PostGIS
shp2pgsql -s 4326 -d -g the_geom shapefilename.shp shapefilename |psql -U username --password -p 5432 -h reallylonghostnametoamazonaws.com dbname
@kaihansen79
kaihansen79 / gist:6437340
Last active May 13, 2016 11:09
People tracker & tagger with C++ OpenCV
#include <opencv2/opencv.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "highgui.h"
#include <stdlib.h>
#include <stdio.h>
#include "opencv2\video\background_segm.hpp"
#include <Windows.h>