Skip to content

Instantly share code, notes, and snippets.

Avatar
😸
use code::latest ;

GAURAV gauravssnl

😸
use code::latest ;
View GitHub Profile
@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
@gauravssnl
gauravssnl / loc.md
Created Oct 25, 2021 — forked from MaskRay/loc.md
Very coarse estimate of compiler complexity/LOC
View loc.md

It is by no means accurate and is comparing apples and oranges in many dimensions, e.g.

  • Targeting LLVM IR, C, assembly have varying difficulty.
  • Some may include runtime while some may not.
  • Different compilers are written in different languages. Languages have different expressiveness. Different paradigms have varying expressiveness.
  • LLVM has many non-default passes which are not used by regular compilation. I try to use fine-grained directories but still some unneeded files are included.

Nevertheless, here is the result (auxiliary files like shell/Makefile/documentation are ignored):

  • gcc (2207000+): tokei gcc libcpp -e ada -e d -e go -e objc -e objcp -e '*test*'
@gauravssnl
gauravssnl / servewasm.py
Created Oct 20, 2021 — forked from prideout/servewasm.py
Python WASM server
View servewasm.py
#!/usr/bin/env python3
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({
'.wasm': 'application/wasm',
View ExceptionTranslation.java
// Exception translation
public
class ExceptionTranslation {
public
String readTheFile(String f) {
try
(BufferedReader is = new BufferedReader(new FileReader(f))) {
String line = is.readLine();
return line;
}
View adbd_launch.sh
db shell am start -n "com.gauravssnl.wifiadb/com.gauravssnl.wifiadb.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER