Skip to content

Instantly share code, notes, and snippets.

View perXautomatik's full-sized avatar

perXautomatik

View GitHub Profile
@perXautomatik
perXautomatik / find-chrome-extensions.ps1
Last active August 30, 2023 13:31 — forked from marcinantkiewicz/find-chrome-extensions.ps1
Powershell - Find chrome extensions
# https://gist.github.com/marcinantkiewicz/9ac20677145f246eb01cd1759cb03f35
# Author: Marcin Antkiewicz
# marcin@kajtek.org
# @deciban
# Use:
#find_chrome_extensions -OutputDir "c:\"
#idea ref: https://www.reddit.com/r/PowerShell/comments/5px71w/getting_chrome_extensions/
#PS 2.o has no convertfrom-json, 2.0 helper from http://stackoverflow.com/questions/28077854/powershell-2-0-convertfrom-json-and-convertto-json-implementation
@perXautomatik
perXautomatik / list-files-in-folder.gs
Last active December 7, 2019 18:48 — forked from hubgit/list-files-in-folder.js
GS - List all files in a folder (Google Apps Script)
function listFilesInFolder() {
var folder = DocsList.getFolder("Maudesley Debates");
var contents = folder.getFiles();
var file;
var data;
var sheet = SpreadsheetApp.getActiveSheet();
sheet.clear();
i
me
my
myself
we
our
ours
ourselves
you
your
@perXautomatik
perXautomatik / Add_ps1_to_New_context_menu.reg
Last active July 11, 2022 10:51 — forked from beeyev/tweaks-win10.reg
Windows 10 must have registry tweaks 2018
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: August 14th 2016
; Tutorial: http://www.tenforums.com/tutorials/60267-powershell-script-add-new-context-menu-windows-10-a.html
[HKEY_CLASSES_ROOT\.ps1\ShellNew]
"NullFile"=""
@perXautomatik
perXautomatik / jsonstream.py
Created October 15, 2020 09:58 — forked from thelastpenguin/jsonstream.py
A library for writing and reading JSON streams from files (optionally supports gz compression)
"""
JsonStream by Gareth George
LICENSE: The do whatever the heck you want with it license.
Do what you want with it, when you want to do it. I take no responsibility for any damages that may occur in the usage of this script. This means no guaranties as to its reliability or stability.
USAGE:
file = open_stream('filename.json', 'rb') # opens the file with the given file name to be read as a json stream
file = open_stream('filename.json.gz', 'rb') # opens the COMPRESSED file with the file name to be read as a json stream
# Bash completion for Homebrew cask uninstall
_brew_cask_update_complete() {
local cur prev opts
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
opts=$(brew cask outdated | cut -c 1-)
COMPREPLY=( $(compgen -W "$opts" -- $cur) )
}
complete -o nospace -F _brew_cask_update_complete bcup
@perXautomatik
perXautomatik / get_gists.py
Created June 16, 2021 10:15 — forked from leoloobeek/get_gists.py
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
@perXautomatik
perXautomatik / README.md
Created July 26, 2021 14:09 — forked from YumaInaura/README.md
Gist — Manage in one repository many gists by using git submodule

Gist — Manage in one repository many gists by using git submodule

Gist is a nice service. We can write code so easily and manage files as repository.

But bad points are …

  • Many repository
  • Gist destributes random hash to perticular gists (repositories).
  • So difficult to find or remember contents as repository.
@perXautomatik
perXautomatik / executionExample.bat
Last active September 20, 2021 12:38 — forked from davisford/gist:5039064
git clone into non-empty directory
cd ~/git/foo
git init
git remote add origin git@github.com:yourname/foo.git
git fetch
git branch master origin/master
git checkout master
git add -A
git commit -m 'first commit'
git push
@perXautomatik
perXautomatik / README.md
Created September 27, 2021 07:47 — forked from takikoo/README.md
Export bookmarks from Google Chrome with a batch script

Export chrome bookmarks

This is a script to export bookmarks from the web browser Google Chrome to a users home drive in a Windows environment with clients and domain controllers. Most of the script comes from this article

Instruction

  • Double-click on the bat-file.
  • Go the home drive on the users new computer.
  • Double-click on openChromeFolder.bat which will take you to the chrome directory on that machiene.
  • Copy the file Bookmarks to the newly opened window.