Skip to content

Instantly share code, notes, and snippets.

Avatar
⚔️

fREW Schmidt frioux

⚔️
View GitHub Profile
@frioux
frioux / ditch-master.sh
Created Jun 13, 2020
You can run this (using https://github.com/ingydotnet/git-hub) to rename all default branches from master to main; run from a fresh, empty repo or the repo you run it from will get all bloated with garbage refs.
View ditch-master.sh
#!/bin/sh
set -e
for r in $(git hub repos -r --all); do
json=$(git hub repo "$r" --json)
# ignore forks
if [ -n "$(echo "$json" | jq -r '.["source/full_name"]+""')" ]; then
echo "skipping $r; fork"
View pressure-vessel-wrap.txt
pressure-vessel-wrap[2593]: Original argv:
pressure-vessel-wrap[2593]: 0: '/home/steam/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/pressure-vessel/bin/pressure-vessel-wrap'
pressure-vessel-wrap[2593]: 1: '--env-if-host=PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
pressure-vessel-wrap[2593]: 2: '--'
pressure-vessel-wrap[2593]: 3: 'steam-runtime-system-info'
pressure-vessel-wrap[2593]: 4: '--verbose'
pressure-vessel-wrap[2593]: Current working directory:
pressure-vessel-wrap[2593]: Physical: /home/steam/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier
pressure-vessel-wrap[2593]: Logical: /home/steam/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier
pressure-vessel-wrap[2593]: Environment variables:
@frioux
frioux / unfollow
Last active Jan 23, 2020
Unfollow repos that are not mine
View unfollow
#!/bin/sh
# NOTE: This assumes you have installed and configured git-hub; get it here:
# https://github.com/ingydotnet/git-hub
for org in $(git hub orgs -Ar); do
for repo in $(git hub org-repos $org -Ar); do
git hub unwatch $repo
done
done
View coffee.md
  • Brazil Dry Process Fazenda Campos Altos: Fruited notes are somewhat edgy, but with convincing sweetness underneath -overripe berry, dried prune, dark baking chocolate, roasted nut, and creamy body. City+ to Full City+. Good for espresso.

  • Sweet Maria's New Classic Espresso: A classic, balanced espresso, but without the baggage of the old world espresso conventions ...and without robusta! The espresso has balanced

View client-script.lua
sharetags = require("sharetags")
local function screen_tag_state(s)
for i, t in ipairs(s.selected_tags) do
local activated = "NOT"
if t.activated then
activated = "IS"
end
print("AC: screen " .. s.index .. " has tag " .. t.name)
end
View genres.md
  1. RTS
  2. arcade
  3. ARPG
  4. JRPG
  5. minigame
  6. sandbox
  7. platformer
  8. voxel
  9. racing
  10. first person
@frioux
frioux / V4.pl
Created May 9, 2017
Example for IAM slide
View V4.pl
use Paws;
Paws->load_class('Paws::Credential::ProviderChain');
use POSIX 'strftime';
use Net::Amazon::Signature::V4;
# ...
has credential_provider => (
is => 'ro',
lazy => 1,
@frioux
frioux / WrapCGI.pm
Last active Jan 14, 2016
replacement Plack::App::WrapCGI (perl only)
View WrapCGI.pm
package Plack::App::WrapCGI;
use strict;
use warnings;
use parent qw(Plack::Component);
use Plack::Util::Accessor qw(script execute _app);
use File::Spec;
use CGI::Emulate::PSGI;
use CGI::Compile;
use Carp;
use POSIX ":sys_wait_h";
@frioux
frioux / ego-boost.sh
Created Jan 7, 2016
How many stars do you have in total?
View ego-boost.sh
#!/bin/dash
ego=${1:-frioux}
count=0
for repo in $(git hub repos --raw $ego); do
inner_count=$(git hub stars $repo --raw | grep -v $ego | wc -l)
count=$(($count + $inner_count))
echo "$repo: $inner_count"
done
@frioux
frioux / query.sql
Last active Jan 4, 2016
Query tuning (4b7216a)
View query.sql
SELECT [me].[id], [me].[site], [me].[channel], [me].[subject], [me].[message], [me].[date], [me].[description], [me].[context], (
SELECT COUNT( * )
FROM [LogChildren] [children_alias]
JOIN [LogStatus] [statuses]
ON [statuses].[child_id] = [children_alias].[id]
WHERE [statuses].[success] = '0' AND [children_alias].[parent_id] = [me].[id]
), (
SELECT COUNT( * )
FROM [LogChildren] [children_alias]
JOIN [LogStatus] [statuses]