Skip to content

Instantly share code, notes, and snippets.

@PSingletary
PSingletary / Get-ChromeExtensions.ps1
Created July 18, 2018 12:16
Gets a list of the currently installed chrome browser extensions for the user running the script. This will get the names of all the installed extensions and dump them to a file on a server named with COMPUTER-USER.txt for auditing. You can then grep this collection of files for certain vulnerable extension names. Script is compatible with Power…
param([String]$OutputFolder=$null,[String]$ExtensionId=$null,[Switch]$Remove, [Switch]$WhatIf)
##: Globals
$retval = $false
##: If OutputFolder param wasn't given, output the audit file to the desktop
if(!$OutputFolder -or !(Test-Path -Path $OutputFolder)) {
$auditfolderpath = "$($env:USERPROFILE)\Desktop"
} else {
$auditfolderpath = $OutputFolder
@uael
uael / jetbrains.sh
Last active December 16, 2021 08:23
#!/bin/sh
if [ -d "/opt/phpstorm" ]; then rm -rvf /opt/phpstorm/*; else mkdir /opt/phpstorm; fi
curl -L "https://data.services.jetbrains.com/products/download?code=PS&platform=linux" | tar xz -C /opt/phpstorm --strip-components=1
cat > /usr/share/applications/jetbrains-phpstorm.desktop <<'EOL'
[Desktop Entry]
Type=Application
Name=Phpstorm
Icon=/opt/phpstorm/bin/phpstorm.png
Exec=gksudo "/opt/phpstorm/bin/phpstorm.sh" %f
Categories=Development;IDE;
@gschizas
gschizas / Amstrad-CPC-6128.kbd.json
Last active November 2, 2020 18:22
Amstrad CPC 6128
[
{
"name": "Amstrad CPC 6128",
"background": {
"name": "PBT Black",
"style": "background-image: url('/bg/plastic/pbt-black.png');"
},
"pcb": false
},
[
@iamarcel
iamarcel / Creating Neat .NET Core Command Line Apps.md
Last active November 28, 2023 10:41
Creating Neat .NET Core Command Line Apps

Creating Neat .NET Core Command Line Apps

You can now read this on my (pretty) website! Check it out here.

Every reason to get more HackerPoints™ is a good one, so today we're going to write a neat command line app in .NET Core! The Common library has a really cool package Microsoft.Extensions.CommandlineUtils to help us parse command line arguments and structure our app, but sadly it's undocumented.

No more! In this guide, we'll explore the package and write a really neat

@gbaman
gbaman / HowToOTGFast.md
Last active May 1, 2024 08:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@iminurnamez
iminurnamez / state_engine.py
Last active October 3, 2023 13:04
Simple state engine example
#This code is licensed as CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/legalcode).
import sys
import pygame as pg
class Game(object):
"""
A single instance of this class is responsible for
managing which individual game state is active
@nocturnalgeek
nocturnalgeek / MailinatorAliases
Last active April 8, 2024 20:45
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
@kracekumar
kracekumar / Writing better python code.md
Last active February 19, 2024 03:06
Talk I gave at June bangpypers meetup.

Writing better python code


Swapping variables

Bad code

@alanhamlett
alanhamlett / api.py
Last active January 24, 2023 21:03
Serialize SQLAlchemy Model to dictionary (for JSON output) and update Model from dictionary attributes.
import uuid
import wtforms_json
from sqlalchemy import not_
from sqlalchemy.dialects.postgresql import UUID
from wtforms import Form
from wtforms.fields import FormField, FieldList
from wtforms.validators import Length
from flask import current_app as app
from flask import request, json, jsonify, abort
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark