Skip to content

Instantly share code, notes, and snippets.

@zakcodez
zakcodez / net-client.js
Last active December 9, 2021 11:23 — forked from sid24rane/net.js
Simple TCP Client and Server in Node.js (Covering all useful Properties & Methods)
const net = require("net");
// creating a custom socket client and connecting it....
const client = new net.Socket();
client.connect({
port: 2222
});
client.on("connect", () => {
@approovm
approovm / 00-android-bypass-certificate-pinning-and-mitm-attack-setup.md
Last active October 25, 2024 09:21
Certificate Pinning Bypassing: Setup with Frida, mitmproxy and Android Emulator with a writable file system
@vneri
vneri / getAllVariables.js
Last active August 4, 2024 07:49
How to get all variables and search through their values in JavaScript
function getAllVariables(){
var searchVarByValue = function(searchString){
var values = Object.keys(this.ValueToVar);
var findings = [];
for (var i=0; i< values.length; i++){
if (values[i] == undefined)
continue;
var position = values[i].toLowerCase().indexOf(searchString.toLowerCase());
if (position != -1){
findings.push({ 'variable': this.ValueToVar[values[i]], 'value' : values[i] });
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active November 13, 2024 03:35
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@davps
davps / install-nodejs-on-raspberrypi-armv6.md
Last active September 22, 2024 18:46
Steps to install nodejs on Raspberry Pi B+ (armv6)

Steps to install nodejs v6.2 on Raspberry Pi B+ (armv6)

cd ~
wget http://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv6l.tar.gz
tar -xzf node-v6.2.1-linux-armv6l.tar.gz
node-v6.2.1-linux-armv6l/bin/node -v

The last command should print v6.2.1.

Now you can copy it to /usr/local

@sid24rane
sid24rane / net.js
Last active October 15, 2024 17:38
Simple TCP Client and Server in Node.js (Covering all useful Properties & Methods)
var net = require('net');
// creates the server
var server = net.createServer();
//emitted when server closes ...not emitted until all connections closes.
server.on('close',function(){
console.log('Server closed !');
});
@RoganDawes
RoganDawes / read_serial.py
Created March 3, 2016 15:50
Simple python script to read two serial ports at the same time. Good for snooping on bidirectional comms!
#!/usr/bin/python3
import serial, time, sys, threading
from colorama import Fore, Style, init as colorama_init
colorama_init()
# lock to serialize console output
lock = threading.Lock()
@illusionfield
illusionfield / bookmarklet-syntax.js
Last active August 12, 2024 19:28
Translate Bookmarklets
/**
* Web browsers use URIs for the href attribute of the <a> tag and for bookmarks. The URI scheme, such as http:, file:, or ftp:, specifies the protocol and the format for the rest of the string.
* Browsers also implement a prefix javascript: that to a parser is just like any other URI.
* Internally, the browser sees that the specified protocol is javascript, treats the rest of the string as a JavaScript application which is then executed, and uses the resulting string as the new page.
*
* The executing script has access to the current page, which it may inspect and change.
* If the script returns an undefined type (rather than, for example, a string), the browser will not load a new page, with the result that the script simply runs against the current page content.
* This permits changes such as in-place font size and color changes without a page reload.
*/
@joefg
joefg / 8080.op
Created July 27, 2015 14:44
A list of all 8080 opcodes. Mirror of Textfiles (http://textfiles.com/programming/8080.op) for posterity
Summary of 8080 Instructions
------- -- ---- ------------
Abbreviations used in this Summary:
R Any of the 8-Bit registers A,B,C,D,E,H,L.
data Any 8-bit or 16-bit value.
PC Program Counter.
SP Stack Pointer.