#!/bin/bash | |
# <xbar.title>Telia GB Left</xbar.title> | |
# <xbar.version>v1.0</xbar.version> | |
# <xbar.author>Flavio De Stefano</xbar.author> | |
# <xbar.author.github>kopiro</xbar.author.github> | |
# <xbar.var>string(SESSID=""): Session ID</xbar.var> | |
# <xbar.var>string(SUBSCRIPTION_ID=""): Subscription ID; if left blank, the first subscription found is gonna be used</xbar.var> | |
headers='-H "Accept: application/json" -H "X-IOS-Build: 4068" -H "ga-av: 10.10.4" -H "ga-aid: com.teliasonera.selfservice.telia" -H "User-Agent: com.teliasonera.selfservice.telia/10.10.4 (iOS 15.2; Apple)" -H "ga-an: Mitttelia"' |
Hi, I'm mcpower. I've done Advent of Code seriously for two years now in Python, placing 9th in 2018 and 12th in 2017. This year, I'm taking a break from aiming for the leaderboard - while it's fun and all, it is a bit stressful at times (the good kind of stress, though!). As such, I'd like to share a few tips for anyone wanting to aim for the leaderboard.
This is everything that worked for me. Your mileage may vary, though - don't take this as gospel, see what works for you.
Go fast.
#!/usr/bin/env bash | |
# handle being called from systemd service | |
if [ -z "$XDG_RUNTIME_DIR" ] && [ -z "$SWAYSOCK" ] | |
then | |
uid=$(id -u "$USER") | |
export XDG_RUNTIME_DIR="/run/user/$uid/" | |
SWAYSOCK=$(find "$XDG_RUNTIME_DIR" -iname "sway*sock") | |
export SWAYSOCK | |
fi |
Update: download the new Pokemon Go app - it fixes all of this. Download it, and reauth, and you should be set. The grant scopes and prompt are correct and visible now too! Now if only I could actually find a pikachu...
- openid
- https://www.googleapis.com/auth/userinfo.email
- https://www.google.com/accounts/OAuthLogin (this scope does much more than it appears. see update on the bottom for more info)
class Dashing.Outboard extends Dashing.Widget | |
ready: -> | |
# This is fired when the widget is done being rendered | |
onData: (data) -> | |
# Handle incoming data | |
# You can access the html node of this widget with `@node` | |
# Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. |
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
#!/usr/bin/env python | |
# I wasn't happy with any of the GitHub libraries for Python that I tried so I | |
# just used the GitHub API directly. If someone would like to rewrite this | |
# using a library please be my guest | |
from __future__ import unicode_literals | |
import argparse | |
import base64 |