Skip to content

Instantly share code, notes, and snippets.

View frioux's full-sized avatar
⚔️

fREW Schmidt frioux

⚔️
View GitHub Profile
@frioux
frioux / ditch-master.sh
Created June 13, 2020 17:58
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.
#!/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"
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 January 23, 2020 17:57
Unfollow repos that are not mine
#!/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
  • 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

@frioux
frioux / client-script.lua
Last active May 24, 2019 15:10
debugging
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
  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 14:47
Example for IAM slide
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 January 14, 2016 19:47
replacement Plack::App::WrapCGI (perl only)
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 January 7, 2016 19:01
How many stars do you have in total?
#!/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 January 4, 2016 20:49
Query tuning (4b7216a)
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]