This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Usage: 'source /path/to/wat.sh <cmd>' | |
# | |
# Outputs 'type <cmd>' or, if it's an alias, cats the script it's aliased to. | |
# Needs to be sourced, not run, because it needs access to all current shell | |
# aliases/variables. | |
WAT_ALIAS_PAT= | |
WAT_ALIAS_PAT+="(" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/usr/bin/perl | |
my @message; | |
my $isGit = 0; | |
while (<>) { | |
push @message, "$_"; | |
$isGit |= m|git\@vger.kernel.org|; | |
} | |
if ($isGit) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Author: Emily Shaffer (2020) | |
# usage: vimdef <full-fn-name> [<git grep arg>...]" | |
# opens vim to the definiton of the provided function name using fuzzy regex magic | |
# Opens vim to a given file and line number. | |
# $1 = file | |
# $2 = line number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# midam: Message-Id git am | |
# Author: Emily Shaffer (@nasamuffin) | |
# | |
# Applies patches based on a Message-Id. | |
# If the Message-Id provided is a cover letter ([PATCH 0/]), apply all | |
# messages with In-Reply-To: <ID> instead. | |
use autodie; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Special matching strings | |
==== | |
^ Start of line | |
$ End of line | |
. Any character | |
~ Match last given substitute string | |
[...] Match range | |
[^...] Not range | |
< Beginning of a word | |
> End of a word |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xA0: | |
sensorType: 0x02 | |
path: /xyz/openbmc_project/sensors/voltage/vout1 | |
sensorReadingType: 0x01 | |
multiplierM: 51 | |
offsetB: 0 | |
bExp: 0 | |
mutability: Mutability::Read | Mutability::Write | |
interfaces: | |
xyz.openbmc_project.Sensor.Value: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urlparse | |
import urllib | |
import re | |
def lambda_handler(event, context): | |
text = urlparse.parse_qs(event['postBody'])['text'][0] | |
username = urlparse.parse_qs(event['postBody'])['user_name'][0] | |
if username == "slackbot": | |
print("I don't even listen to myself.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import string | |
import unicodedata | |
def pad(width): | |
return uni(" ") * width | |
def uni(stringy): | |
ascii_to_wide = dict((i, unichr(i + 0xfee0)) for i in range(0x21, 0x7f)) | |
ascii_to_wide.update({0x20: u'\u3000', 0x2D: u'\u2212'}) # space and minus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urlparse | |
import urllib | |
import re | |
print('Loading function') | |
def lambda_handler(event, context): | |
if not 'text' in urlparse.parse_qs(event['postBody']): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WeaknessesIntent what is {grass|Type} weak against | |
WeaknessesIntent what are the weaknesses for {grass|Type} | |
WeaknessesIntent what does {grass|Type} lose to | |
WeaknessesIntent what are {grass|Type}'s weaknesses | |
WeaknessesIntent what is super effective against {grass|Type} | |
WeaknessesIntent what deals the most damage to {grass|Type} | |
WeaknessesIntent what hurts {grass|Type} the most | |
WeaknessesIntent what types are {grass|Type} weak against | |
WeaknessesIntent what types are {grass|Type} weak to | |
WeaknessesIntent what should I use against {grass|Type} |
NewerOlder