Skip to content

Instantly share code, notes, and snippets.

View aug2uag's full-sized avatar

Reza Fatahi aug2uag

  • Los Angeles, CA
View GitHub Profile
# Ethereum helper methods
# source this in your .bashrc or .zshrc file with `. ~/.ethrc`
# --- Solidity sandbox ---
# https://github.com/maurelian/solidity-sandbox
scratch() {
dir=$(pwd)
cd ~/Documents/projects/solidity-sandbox || exit
bash newTest.sh $1
cd "$dir" || exit
@talhaanwarch
talhaanwarch / sentence_similarity.py
Created June 12, 2021 17:00
CALCULATE SENTENCE SIMILARITY using Pretrained BERT model
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 11 18:58:05 2021
# CALCULATE SENTENCE SIMILARITY
@author: TAC
"""
import torch#pytorch
from transformers import AutoTokenizer, AutoModel#for embeddings
from sklearn.metrics.pairwise import cosine_similarity#for similarity
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nstarke
nstarke / linksys-ea4500-device-firmware-decryption.md
Created March 18, 2020 03:09
Linksys EA4500 Device Firmware Decryption

Linksys EA4500 Firmware Decryption

I recently pulled a Linksys EA4500 out of storage for evaluation. The first thing I wanted to do was to update the firmware for the device. https://www.linksys.com/us/support-article?articleNum=148385 offers the latest version of the firmware, which is 3.1.7 as of this writing.

However, we can see with the filename that its probably encrypted: FW_EA4500V3_3.1.7.181919_prod.gpg.img

When I run binwalk I don't get any meaningful results, confirming my suspcicions:

@bbachi
bbachi / Dockerfile
Created September 6, 2019 05:56
docker env
# base image
ARG TAG=slim
FROM node:$TAG
ARG PORT_ARG=3080
# setting the work direcotry
WORKDIR /usr/src/app
ENV PORT=$PORT_ARG
@gdzhu
gdzhu / 0_rev_R33.md
Last active September 20, 2021 20:39

reverse R33-sysupgrade-20180510-910b5192.bin

file

Just to make sure it is a firmware image instead of a zip file:

1

strings

@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active April 23, 2024 17:11 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@ayoisaiah
ayoisaiah / main.rs
Last active January 30, 2023 12:30
Find Mean, Median and Mode in Rust
use std::collections::HashMap;
fn mean(numbers: &Vec<i32>) -> f32 {
let sum: i32 = numbers.iter().sum();
sum as f32 / numbers.len() as f32
}
@zubaer-ahammed
zubaer-ahammed / Reset MySQL Root Password in Mac OS.md
Last active April 4, 2024 10:38
Reset MySQL Root Password in Mac OS

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@Unitech
Unitech / nginx.conf
Last active April 14, 2020 17:48
NGINX/PM2
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;