Skip to content

Instantly share code, notes, and snippets.

View nenadg's full-sized avatar
🍺
out

Nenad Golubovic nenadg

🍺
out
View GitHub Profile
@Markus-de-Koster
Markus-de-Koster / Teams_PWA_links.md
Last active March 5, 2025 13:35
Open Teams links in edge PWA, for all other links, use firefox (Linux Ubuntu)
@adtac
adtac / Dockerfile
Last active April 7, 2025 15:29
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@bradtraversy
bradtraversy / tailwind-webpack-setup.md
Last active April 14, 2025 19:43
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

@bewarusman
bewarusman / one-file.js
Last active March 31, 2023 07:47
Minimal Express.js Server
/** STEP 1: Packages */
// For a minimal node.js server we need to install and import the bellow packages
const express = require("express"); // fast, open-source node.js server
const cors = require("cors"); // enables CORS (cross-origin resource sharing)
const bodyParser = require("body-parser"); // parses json body into javascript object
const morgan = require("morgan"); // log http requests
const mongoose = require("mongoose"); // mongodb orm
/** STEP 2: DATABASE */
@m4ll0k
m4ll0k / tojson.py
Created June 1, 2020 15:48
html to json using html2json.com api
# by m4ll0k
# github.com/m4ll0k
# gist.github.com/m4ll0k
# Usage:
#------ python3 tojson.py https://www.example.com
#------ cat targets.txt | python3 tojson.py
import requests as _0x1
import sys as _0x2
@highfestiva
highfestiva / binance-liquidation-calculator.py
Last active February 20, 2025 16:44
CLI Binance liquidation calculation formula
#!/usr/bin/env python3
'''2021-03-26: Reverse-engineer by searching for the following terms in features*.js:
- bracketMaintenanceMarginRate
- cumFastMaintenanceAmount
- bracketNotionalFloor
- bracketNotionalCap'''
# (max) position, maintenance margin, maintenance amount
maint_lookup_table = [
@woblerr
woblerr / README.md
Created December 12, 2019 14:01
Docker containers logs clearing script

Docker containers logs clearing script

chmod +x ./clear_docker_container_logs.sh

Usage

Usage: ../clear_docker_container_logs.sh [-c ""]
@sleepyfox
sleepyfox / 2019-07-25-users-hate-change.md
Last active September 13, 2024 08:39
'Users hate change'

'Users hate change'

This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

@wshayes
wshayes / demo.py
Created May 27, 2019 20:19
[Websocket demo for fastapi] example of broadcast using websockets for fastapi #fastapi #websockets
# From https://github.com/tiangolo/fastapi/issues/258
from typing import List
from fastapi import FastAPI
from starlette.responses import HTMLResponse
from starlette.websockets import WebSocket, WebSocketDisconnect
app = FastAPI()
@acosonic
acosonic / attack_urls.txt
Last active November 16, 2021 13:29
Comprehensive list of attack/probe URL's
#This was done by some tool, don't know which one, and our custom built app captured theese URL's, after filtering
#for unique URL's, here is list of URL's in original form, I will later try to create some protection
/3B1728A10D221805D2CABE58B095D353.php
/manager/html
/wp-content/plugins/portable-phpmyadmin/wp-pma-mod/index.php
/mysql/mysqlmanager/index.php
/mysql/sqlmanager/index.php
/mysql/dbadmin/index.php
/mysql/admin/index.php
/phpmy/index.php