Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven Tobias stobias123

View GitHub Profile
View main.cue
package todoapp
import (
"dagger.io/dagger"
"universe.dagger.io/docker"
"universe.dagger.io/bash"
)
dagger.#Plan & {
client: {
@stobias123
stobias123 / spamvote
Last active Dec 14, 2021
vote on house.
View spamvote
## RUN THIS FIRST IN YOUR TERMINAL
## pip install selenium
import time
from selenium import webdriver
ntimes = YOUR_NUMBER_OF_VOTES
@stobias123
stobias123 / bash_colors
Created Jun 28, 2021
Some bash colors so I don't have to keep writing this.
View bash_colors
# ----------------------------------
# Colors
# ----------------------------------
NOCOLOR='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
View gist:9b22235e5e797402f56156e72b547e40
2020/09/08 13:24:14 [INFO] Terraform version: 0.12.24
2020/09/08 13:24:14 [INFO] Go runtime version: go1.12.13
2020/09/08 13:24:14 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.0.0/versions/0.12.24/terraform", "apply"}
2020/09/08 13:24:14 [DEBUG] Attempting to open CLI config file: /Users/userbar/.terraformrc
2020/09/08 13:24:14 Loading CLI configuration from /Users/userbar/.terraformrc
2020/09/08 13:24:14 [DEBUG] checking for credentials in "/Users/userbar/.terraform.d/plugins"
2020/09/08 13:24:14 [DEBUG] checking for credentials in "/Users/userbar/.terraform.d/plugins/darwin_amd64"
2020/09/08 13:24:14 [INFO] CLI command args: []string{"apply"}
2020/09/08 13:24:14 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/09/08 13:24:14 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
@stobias123
stobias123 / git aliases
Created Aug 10, 2020
Pretty git aliases.
View git aliases
[alias]
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
View tensorforce_agent.py
## tensorforce_agent.py
# This code breaks immediately here with "Unknown Gym Environment"
env = gym.make("my_gm:level-v0")
environment = Environment.create(environment='gym', level=env, max_episode_timesteps=1000)
## it works fine as shown int his file. :/
class RandomAgent(object):
"""The world's simplest agent!"""
def __init__(self, action_space):
@stobias123
stobias123 / govc
Last active Apr 3, 2020
Command line autocompletion for `govc`
View govc
#compdef govc
_govc () {
local line
local -a top_level_cmds
top_level_cmds=$(_govc_top_level_commands)
_arguments -C \
'1: :_govc_top_level_commands' \
"*::arg:->args"
@stobias123
stobias123 / wavefront.py
Created Apr 1, 2020
Ansible Callback for wavefront.
View wavefront.py
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import time
from wavefront_api_client.rest import ApiException
from pprint import pprint
from os.path import basename
import wavefront_api_client as wave_api
@stobias123
stobias123 / wavefront callback
Created Apr 1, 2020
Ansible Callback for wavefront.
View wavefront callback
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import time
from wavefront_api_client.rest import ApiException
from pprint import pprint
from os.path import basename
import wavefront_api_client as wave_api
View gist:78a839d13b2386098aedd875802ee7bb
reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters /v DisabledComponents /t REG_DWORD /d 0x000000FF