Skip to content

Instantly share code, notes, and snippets.

@SoabY
SoabY / JetBrains products Activation code until 15 May 2024
Created October 1, 2023 08:04
JetBrains products Activation code until 15 May 2024
8Z6IT0PIZH-eyJsaWNlbnNlSWQiOiI4WjZJVDBQSVpIIiwibGljZW5zZWVOYW1lIjoiSHVuYW4gTm9ybWFsIFVuaXZlcnNpdHkiLCJhc3NpZ25lZU5hbWUiOiJTdGFyayB6aGFuZyIsImFzc2lnbmVlRW1haWwiOiJzdGFyazE5ODUyMDIwQGdtYWlsLmNvbSIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyNC0wNS0xNSIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiR08iLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0YiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiRFMiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBDIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZ
@wfrisch
wfrisch / http-serve-incomplete-responses.py
Created February 1, 2024 09:15
Deliberately broken HTTP server that responds with either a) false Content-Length or b) broken chunked encoding
#!/usr/bin/env python3
"""
Deliberately broken HTTP server that responds with either
- false Content-Length
- broken chunked encoding
both triggering ChunkedEncodingError in clients using `python-requests`:
- ChunkedEncodingError: Connection broken: IncompleteRead
- ChunkedEncodingError: Connection broken: InvalidChunkLength
"""
@loilo
loilo / base64.mjs
Last active April 18, 2024 07:52
URL-Safe LZMA Compression
/**
* Convert between Uint8Array and Base64 strings
* Allows for any encoded JS string to be converted (as opposed to atob()/btoa() which only supports latin1)
*
* Original implementation by madmurphy on MDN
* @see https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_1_–_JavaScript%27s_UTF-16_%3E_base64
*/
function b64ToUint6(nChr) {
return nChr > 64 && nChr < 91
@hyOzd
hyOzd / delete-file-and-buffer.el
Created July 21, 2015 11:55
emacs delete current file and close the buffer
;; based on http://emacsredux.com/blog/2013/04/03/delete-file-and-buffer/
(defun delete-file-and-buffer ()
"Kill the current buffer and deletes the file it is visiting."
(interactive)
(let ((filename (buffer-file-name)))
(if filename
(if (y-or-n-p (concat "Do you really want to delete file " filename " ?"))
(progn
(delete-file filename)
(message "Deleted file %s." filename)
@girip11
girip11 / mac_os_kb_ubuntu_like.md
Last active April 18, 2024 07:50
Configuring Mac OS keyboard shortcuts to resemble Ubuntu

Setup MacOS shortcuts to be same as Ubuntu

I have been using Ubuntu for last few years. Now I have to work on Mac OS for work. But I still use personal laptop which has Ubuntu. So I decided to setup the Mac OS shortcuts to be exactly same as in Ubuntu.

Prerequisites

I've recently joined Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for Tech roles. So sharing list of companies:

Do consider to STAR, if it helped you.

London

@nmerkulov
nmerkulov / main.go
Created May 20, 2020 08:23
repo generator few lines
package main
import (
"fmt"
. "github.com/dave/jennifer/jen"
"go/ast"
"go/parser"
"go/token"
"log"
"regexp"
@manuel-schoebel
manuel-schoebel / api-log-route.ts
Last active April 18, 2024 07:47
next.js simple logger
import { NextRequest, NextResponse } from 'next/server';
export async function POST(request: NextRequest, res: NextResponse) {
const data = await request.json();
switch (data.level) {
case 'error':
console.error(data);
break;
case 'warn':
console.warn(data);
@luciopaiva
luciopaiva / android-apk-hacking-how-to.md
Last active April 18, 2024 07:46
Android APK hacking how-to

Android APK hacking how-to

Install and configure SDK

  • install Android Studio (google it)

  • configure your shell (considering Linux+Bash):

    export ANDROID_HOME=$HOME/Android/Sdk
    export PATH=$PATH:$ANDROID_HOME/tools
    

export PATH=$PATH:$ANDROID_HOME/platform-tools