Skip to content

Instantly share code, notes, and snippets.

View muchrm's full-sized avatar
😃

Pongpanot Chuaysakun muchrm

😃
  • LINE THAILAND
  • Thailand
  • 10:50 (UTC +07:00)
View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active September 28, 2025 08:09
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
#!/bin/sh
echo "=========================="
echo "CI_COMMIT_SHA = "$CI_COMMIT_SHA
echo "CI_MERGE_REQUEST_TARGET_BRANCH_NAME = "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
ALL_FILE_CHANGES=$(git diff --name-only $CI_COMMIT_SHA "origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" | xargs)
echo "=========================="
echo "ALL_FILE_CHANGES = "$ALL_FILE_CHANGES
MAP_ALL_FILE_CHANGES=$(echo $ALL_FILE_CHANGES | sed -e 's/[[:blank:]]/\\|/g')
@ih2502mk
ih2502mk / list.md
Last active October 20, 2025 02:13
Quantopian Lectures Saved
@diachedelic
diachedelic / deep-link-from-browser.js
Last active June 10, 2025 08:37
Deep link to a native app from a browser, with a fallback
@narate
narate / vibie.play
Last active January 17, 2018 16:50
ffplay live from vibie.live required ffmpeg --with-ffplay and jq
#!/bin/bash
LIVE_DATA=$(curl -s "$1" | grep __NEXT_DATA__ | sed 's/__NEXT_DATA__ =//g')
STATUS=$(echo $LIVE_DATA | jq '.props.live.status' | sed 's/"//g')
if [ $STATUS == "inactive" ]
then
echo "ERROR: live status is $STATUS"
exit -1
fi
@worawit
worawit / eternalblue7_exploit.py
Last active September 19, 2025 16:11
Eternalblue exploit for Windows 7/2008
#!/usr/bin/python
# This file has no update anymore. Please see https://github.com/worawit/MS17-010
from impacket import smb
from struct import pack
import sys
import socket
'''
EternalBlue exploit for Windows 7/2008 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@jeshan
jeshan / get-lambda-event-source.js
Last active April 11, 2025 18:10
AWS Lambda: Determine Event Source from event object. Note that this is an approximation as anybody can send a payload that resembles the real thing.
function getLambdaEventSource(event) {
if (event.Records && event.Records[0].cf) return 'isCloudfront';
if (event.configRuleId && event.configRuleName && event.configRuleArn) return 'isAwsConfig';
if (event.Records && (event.Records[0].eventSource === 'aws:codecommit')) return 'isCodeCommit';
if (event.authorizationToken === "incoming-client-token") return 'isApiGatewayAuthorizer';
if (event.StackId && event.RequestType && event.ResourceType) return 'isCloudFormation';
@leny
leny / .eslintrc.json
Last active August 3, 2024 16:44
ESLint config file for node.js + ES6 projects.
{
"env": {
"node": true,
"es6": true
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParameters": true,
@mizrael
mizrael / FakeFindFluent.cs
Created December 16, 2015 14:49
fake implementation of mongodb IFindFluent used for testing
public class FakeFindFluent<TEntity> : IFindFluent<TEntity, TEntity>
{
private readonly IEnumerable<TEntity> _items;
public FakeFindFluent(IEnumerable<TEntity> items)
{
_items = items ?? Enumerable.Empty<TEntity>();
}
public Task<TEntity> FirstOrDefaultAsync(CancellationToken cancellationToken)
@staltz
staltz / introrx.md
Last active October 14, 2025 19:39
The introduction to Reactive Programming you've been missing