Skip to content

Instantly share code, notes, and snippets.

Avatar
😸
use code::latest ;

GAURAV gauravssnl

😸
use code::latest ;
View GitHub Profile
View profile.md
@gauravssnl
gauravssnl / console.py
Created Jan 8, 2022 — forked from j1o1h1n/console.py
This is a demo of an interactive console in a Textual user interface.
View console.py
from __future__ import annotations
import string
import code
import sys
import io
from typing import Callable
from textual.app import App
from textual.widgets import Header, ScrollView
@gauravssnl
gauravssnl / flask_setup_heroku.md
Created Dec 13, 2021 — forked from mayukh18/flask_setup_heroku.md
How to setup flask app with database on heroku
View flask_setup_heroku.md

Setting up flask app in heroku with a database

The below article will cover the intricacies of setting up databases and heroku in respect to a flask app. This is more like a memo and will have out of sequence instructions or solutions to errors so read thoroughly.

Setting up a database

You'll need the packages

@gauravssnl
gauravssnl / gist:2988bcaa22c59e8a377e8854efe91633
Created Dec 13, 2021 — forked from lost-theory/gist:3005268
consume JSON REST API blueprint inside flask app
View gist:2988bcaa22c59e8a377e8854efe91633
from flask import Flask, jsonify, Blueprint, current_app
import json
## REST api ###################################################################
api = Blueprint('api', __name__)
@api.route("/users")
def users():
return jsonify(users=[
@gauravssnl
gauravssnl / clear_cache_MS_Teams.sh
Created Dec 1, 2021 — forked from mrcomoraes/clear_cache_MS_Teams.sh
Clear cache Microsoft Teams on Linux
View clear_cache_MS_Teams.sh
#!/bin/bash
# This script cleans all cache for Microsoft Teams on Linux
# Tested on Ubuntu-like and Debian by @necrifede. Feel free to test/use in other distributions.
# Tested with Teams via snap package.
#
# How to use in terminal:
# ./clear_cache_MS_Teams.sh ( deb-stable | deb-insider | snap )
# or
# bash clear_cache_MS_Teams.sh ( deb-stable | deb-insider | snap )
View VSCode-extensions
code --install-extension QassimFarid.ejs-language-support
code --install-extension SirTori.indenticator
code --install-extension TimonVS.ReactSnippetsStandard
code --install-extension TwentyChung.jsx
code --install-extension abusaidm.html-snippets
code --install-extension asvetliakov.move-imports
code --install-extension aws-scripting-guy.cform
code --install-extension bierner.markdown-preview-github-styles
code --install-extension ccitiriga.TSMethodCreator
code --install-extension christian-kohler.npm-intellisense
@gauravssnl
gauravssnl / curl-ca.md
Created Nov 4, 2021 — forked from olih/curl-ca.md
Curl with custom CA certificates
View curl-ca.md

Using curl with custom CA certificates

This document describes how to use curl with both custom and official CA SSL certificates.

Prerequisite

You would need first to install curl , see http://curl.haxx.se/docs/install.html. Using a package manager such as yum, brew, ... for your platform should be the easiest though.

Example for Mac OS:

@gauravssnl
gauravssnl / shake.go
Created Oct 30, 2021 — forked from JeremyMorgan/shake.go
The most important code I've ever written
View shake.go
package main
import (
"fmt";
)
func loopit(phrase string, repeat int)(string){
var outputphrase string = "";
@gauravssnl
gauravssnl / attestation.md
Created Oct 29, 2021 — forked from liamcottle/attestation.md
SafetyNet Attestation Bypass
View attestation.md

SafetyNet Attestation Bypass

Proof that with a few hours work, you can easily provide aribitrary data to the Google SafetyNet API and receive a valid Attestation signed by attest.android.com.

I've captured the HARDWARE_BACKED flag. Check this comment.

This is only a software backed attestation, as you can see with the evaluationType=BASIC. I don't have any devices that support hardware backed attestations via TEE, however once I do, I'll be taking a look into them 🤠

  • nonce: base64(liam@liamcottle.com)
  • packageName: liam@liamcottle.com
View How to make Monterey Installer ISO.md

How to create a Bootable Monterey ISO

set -e
set -u

# Create an empty
hdiutil create -o /tmp/empty -size 8400m -volname "Monterey" -layout SPUD -fs HFS+J

# Rename to .img since this isn't a compressed disk image