Skip to content

Instantly share code, notes, and snippets.

View btamayo's full-sized avatar
🏠
Working from home

Bianca Tamayo btamayo

🏠
Working from home
View GitHub Profile
@btamayo
btamayo / fmtstr.py
Last active August 25, 2017 01:46
Format string problem
# Template
TEST_TEMPLATE_RAW = """@test "{description} [{shell}]" {{
run ./{script_name} {shell} --debug --no-exec
{assert_type} {partial} {regexflag} "{expected}"
}}
# Codebit
# test is dumped in by pyyaml
print TEST_TEMPLATE_RAW.format(**test)

Keybase proof

I hereby claim:

  • I am btamayo on github.
  • I am btamayo (https://keybase.io/btamayo) on keybase.
  • I have a public key whose fingerprint is 293E AEBD 6EC3 21C6 B403 5351 FB06 F9A0 579F 1956

To claim this, I am signing this object:

@btamayo
btamayo / gist:d8cc7447fce217fabc00
Created October 6, 2015 05:21
Shortest substring
public String scanString() {
int start = s.length() - 1;
int end = s.length() - 1;
int maxLengthFound = s.length(); // Initial maximum length
System.out.println("end: " + end);
for (int i = 0; i < s.length(); i++) {
System.out.println("Checking substring: " + s.substring(0, i + 1) + ", valid: " + isValid());
@btamayo
btamayo / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

agnoster-with-rvm.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#