Skip to content

Instantly share code, notes, and snippets.

View SkyN9ne's full-sized avatar
💚

SkyN9ne SkyN9ne

💚
View GitHub Profile
@SkyN9ne
SkyN9ne / requests.py
Last active October 10, 2024 00:03 — forked from kennethreitz/0_urllib2.py
Python urllib2 vs requests comparison / samples
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
r = requests.get('https://api.github.com', auth=('user', 'pass'))
print r.status_code
print r.headers['content-type']
@SkyN9ne
SkyN9ne / test-subshell.bat
Created August 13, 2024 03:44
Detect if you're running in a cmd.exe subshell
@echo off
setlocal EnableDelayedExpansion
:: Dequote path to command processor and this script path
set ScriptPath=%~0
set CmdPath=%COMSPEC:"=%
:: Get command processor filename and filename with extension
for %%c in (!CmdPath!) do (
@SkyN9ne
SkyN9ne / web-app-internals.js
Created July 20, 2024 20:06
edge:// internal suspicious files
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import "./strings.m.js";
import {
assertNotReached
} from "edge://resources/js/assert.js";
import {
loadTimeData
} from "edge://resources/js/load_time_data.js";
@SkyN9ne
SkyN9ne / clr_via_native.c
Last active July 17, 2024 08:56 — forked from dev-2null/clr_via_native.c
2 Simple C and C++ example of showing the loading of am .NET CLR via unmanaged native code
#include "stdafx.h"
int main()
{
ICLRMetaHost *metaHost = NULL;
IEnumUnknown *runtime = NULL;
ICLRRuntimeInfo *runtimeInfo = NULL;
ICLRRuntimeHost *runtimeHost = NULL;
IUnknown *enumRuntime = NULL;
LPWSTR frameworkName = NULL;
@SkyN9ne
SkyN9ne / clr_via_native.c
Created July 17, 2024 07:49 — forked from xpn/clr_via_native.c
A quick example showing loading CLR via native code
#include "stdafx.h"
int main()
{
ICLRMetaHost *metaHost = NULL;
IEnumUnknown *runtime = NULL;
ICLRRuntimeInfo *runtimeInfo = NULL;
ICLRRuntimeHost *runtimeHost = NULL;
IUnknown *enumRuntime = NULL;
LPWSTR frameworkName = NULL;
@SkyN9ne
SkyN9ne / termux-bashrc.sh
Created July 16, 2024 17:42
My bash.bashrc configuration for Termux on Android
# Command history tweaks:
# - Append history instead of overwriting
# when shell exits.
# - When using history substitution, do not
# exec command immediately.
# - Do not save to history commands starting
# with space.
# - Do not save duplicated commands.
shopt -s histappend
shopt -s histverify
@SkyN9ne
SkyN9ne / UbuntuWSL-bashrc.SH
Last active June 22, 2024 09:57
A bash.bashrc configuration file. Designed originally for usage on Ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
#!/usr/bin/env bash
PREFIX=${PREFIX:-/usr/local}
set -eo pipefail
if ! which gh >/dev/null; then
echo "gh is not installed. Please install gh and try again."
echo "See https://github.com/cli/cli"
exit 1
# Windows God Mode
Create a folder anywhere you want a shortcut to
every setting imaginable called `GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}`
That's it. I got this from Twitter or something.
@SkyN9ne
SkyN9ne / .editorconfig
Last active June 3, 2024 20:33 — forked from cmbaughman/.editorconfig
Editor Config
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
quote_type = single
### Frontend files