Skip to content

Instantly share code, notes, and snippets.

View martin12333's full-sized avatar

Martin Milan martin12333

View GitHub Profile
@lepinekong
lepinekong / .ReAdABLE.HumanFormat.deploy.ps1
Last active July 5, 2018 14:59
ReAdABLE.HumanFormat: a new standard format easier to read, write and maintain to generate Markdown (and much more coming). Just copy and paste .ReAdABLE.HumanFormat.deploy.ps1 oneliner content in Powershell to download.
$demo="ReAdABLE.Human.Format";$github='https://gist.github.com/lepinekong/b59fa3e8d386dea1ebaa1a096488c542';$githublib='https://gist.github.com/lepinekong/7574892bfefe7e53e7bd4dd4759f30f8';$demofolder="C:\red\demos\$demo";$exefolder="C:\red";$exeurl='https://static.red-lang.org/dl/win/red-063.exe';Add-Type -AssemblyName Microsoft.VisualBasic;$demofolder=[Microsoft.VisualBasic.Interaction]::InputBox("Enter folder for $demo demo:", $demo, $demofolder);if ($demofolder -ne $null) {$demo=Split-Path $demofolder -Leaf;Function Get-Github-Links {Param($uri);[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$WebResponse = Invoke-WebRequest -Uri "$uri";return $ResponseLinks=$WebResponse.Links | Select href};Function Filter-Link {Param($filter);$links = $AllLinks | Where-Object {$_.href -match "$filter"};$link=$links[0].href;return $link};Function Get-Github-Url {Param($filename);$link=Filter-Link $filename;$url="https://gist.githubusercontent.com$link";return $url};$AllLinks = Get-Github-L
@roycewilliams
roycewilliams / dmesg-slackware-alix-console.txt
Last active December 14, 2019 14:43
dmesg-slackware-alix-console.txt
PC Engines ALIX.2 v0.99h
640 KB Base Memory
261120 KB Extended Memory
01F0 Master 044A CF 4GB
Phys C/H/S 7785/16/63 Log C/H/S 973/128/63
LILO 24.2 boot:
Loading Linux.......................................................................................................................................
BIOS data check successful
@photonstorm
photonstorm / phaser3-example.html
Last active February 21, 2024 05:27
Phaser 3 Example
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/phaser@3.15.1/dist/phaser-arcade-physics.min.js"></script>
</head>
<body>
<script>
var config = {
type: Phaser.AUTO,
@kizzx2
kizzx2 / with-env.ps1
Last active June 14, 2024 06:17
Run command with environment variables in PowerShell
$ori = @{}
Try {
$i = 0
# Loading .env files
if(Test-Path $args[0]) {
foreach($line in (Get-Content $args[0])) {
if($line -Match '^\s*$' -Or $line -Match '^#') {
continue
}
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active June 10, 2024 19:30
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@stueja
stueja / lxd-wayland-gui.md
Last active May 27, 2024 21:47
GUI application via Wayland from Ubuntu LXD container on Arch Linux host
@rumblesan
rumblesan / takeaway.md
Last active December 9, 2020 16:51
Take away doc for the HipHop and Code workshop
@mackwage
mackwage / windows_hardening.cmd
Last active June 8, 2024 16:54
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@murrant
murrant / print_open_fds
Created August 1, 2017 03:27
Python script to list open file descriptors
descriptors = set()
def print_open_fds(print_all=False):
global descriptors
(frame, filename, line_number, function_name, lines, index) = inspect.getouterframes(inspect.currentframe())[1]
fds = set(os.listdir('/proc/self/fd/'))
new_fds = fds - descriptors
closed_fds = descriptors - fds
descriptors = fds
if print_all: