Skip to content

Instantly share code, notes, and snippets.

🤓
Busy ... Always busy

Mitchell Krog mitchellkrogza

🤓
Busy ... Always busy
Block or report user

Report or block mitchellkrogza

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mitchellkrogza
mitchellkrogza / fb_post_photo.sh
Created Sep 10, 2019 — forked from fishkingsin/fb_post_photo.sh
post photo with curl and facebook graph
View fb_post_photo.sh
curl 'https://graph.facebook.com/me/photos' -F 'access_token=access_token' -F 'source=@'$1 -F 'message='$(date +"%Y-%m-%d-%S")
@mitchellkrogza
mitchellkrogza / Cerbot Renewals with Mini(Conda) Python, Bash and Cron - Foolproof and Failproof Renewal Script
Last active Oct 1, 2019
Fool proof and fail proof Cerbot SSL certificate automated renewal script using a miniConda Python environment, bash and cron.
View Cerbot Renewals with Mini(Conda) Python, Bash and Cron - Foolproof and Failproof Renewal Script
#!/bin/bash
# -----------------------------------------------------------
# Mini(Conda) Environment for Failproof Certbot Renewals
# Created by Mitchell Krog: https://github.com/mitchellkrogza
# Copyright Mitchell Krog: https://github.com/mitchellkrogza
# GIST: https://gist.github.com/mitchellkrogza/547a850a34d022009e5d80e896684eac
# Last Updated: 2019-10-01 11:11:00 SAST
# -----------------------------------------------------------
# Save as certbot-renewals.sh
View _Example polkit rules_.md

These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8) manpage for the object structure and available API. These examples are for polkit versions 106 and later, with the JS interpreter. They won't work with Debian's polkit v105.

  • If you don't know the action name, run pkaction:

    pkaction | grep cups
    
  • The possible results are YES, AUTH_SELF(_KEEP), AUTH_ADMIN(_KEEP), NO. Returning a result is final. Returning null will continue checking other rules.

  • Put your rules in /etc/polkit-1/rules.d/*.rules. (You can check everything in one giant addRule, or you can have a separate file and separate addRule for each program; it doesn't matter.)

@mitchellkrogza
mitchellkrogza / meta-tags.md
Created Jul 17, 2018 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
View gist:39cf02fecf8ca68dc42cd529806f2024
### Keybase proof
I hereby claim:
* I am mitchellkrogza on github.
* I am mitchellkrog (https://keybase.io/mitchellkrog) on keybase.
* I have a public key ASA1MsGmj-PFzfJI7htumKuWIAVDP6R8fDTXFwBeQqOMtwo
To claim this, I am signing this object:
View OS X macOS Install ISO Creator
#!/bin/bash
################################
# OS X Install ISO Creater #
# #
# Author: shela #
################################
#######################################
# Declarations
@mitchellkrogza
mitchellkrogza / rpi3-arch-linux-to-sdcard.sh
Created Oct 10, 2017 — forked from pklaus/rpi3-arch-linux-to-sdcard.sh
Raspberry Pi 3: Arch Linux ARM 64bit to SDcard Script. This is for the Rapsberry Pi 3. For the RPi 2 (or the 3 32bit), see https://gist.github.com/pklaus/9dd4a7bf040788cda501 . For the RPi 1, see https://gist.github.com/pklaus/b92dfc72136d1509c2ed .
View rpi3-arch-linux-to-sdcard.sh
#!/bin/bash
# <https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3>
set -x
echo -e "\n\nArch Linux ARM to SD Card\n"
echo -e "for the Raspberry Pi 3\n\n"
echo -e "\nAll drives on this computer:\n"
@mitchellkrogza
mitchellkrogza / GitRepoUpdateTimestamp.sh
Created Oct 6, 2017 — forked from jeffery/GitRepoUpdateTimestamp.sh
Update Timestamp of files in Checked-out Git Repository
View GitRepoUpdateTimestamp.sh
#!/bin/bash -e
####
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
# This becomes a problem when you want the cloned repository, which is part of a
# Web application have a proper cacheing mechanism so that it can re-cache files
@mitchellkrogza
mitchellkrogza / travis-ci-git-commit.bash
Created Jun 23, 2017 — forked from ddgenome/travis-ci-git-commit.bash
Make a commit on a branch in a Travis CI build, dealing with detached HEAD state safely
View travis-ci-git-commit.bash
#!/bin/bash
# function to make a commit on a branch in a Travis CI build
# be sure to avoid creating a Travis CI fork bomb
# see https://github.com/travis-ci/travis-ci/issues/1701
function travis-branch-commit() {
local head_ref branch_ref
head_ref=$(git rev-parse HEAD)
if [[ $? -ne 0 || ! $head_ref ]]; then
err "failed to get HEAD reference"
return 1
@mitchellkrogza
mitchellkrogza / rules-both.iptables
Created Apr 15, 2017 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
View rules-both.iptables
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
You can’t perform that action at this time.