Skip to content

Instantly share code, notes, and snippets.

View Br3nda's full-sized avatar
🦋
MAKE ALL THE THINGS

Brenda Wallace Br3nda

🦋
MAKE ALL THE THINGS
View GitHub Profile
@Br3nda
Br3nda / maya2018install.sh
Created August 18, 2022 23:51 — forked from nrtkbb/maya2018install.sh
Maya 2018 Installation on Ubuntu 18.04
#!/bin/bash
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!”
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
@Br3nda
Br3nda / soft_hack.md
Last active December 30, 2021 20:50 — forked from zvldz/soft_hack.md
soft_hack.md

Soft hack to open telnet

You need gateway 3(mgl03) connected to MiHome. And also ip and gateway token.

Option 1 (recommended)

Via XiaomiGateway3 component.

You must input in the 'Open Telnet command' field(as it is without changing anything):

{"method":"set_ip_info","params":{"ssid":"\"\"","pswd":"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd"}}
@Br3nda
Br3nda / capybara cheat sheet
Created July 14, 2017 07:39 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@Br3nda
Br3nda / registrations_controller.rb
Created February 9, 2017 23:03 — forked from jwo/registrations_controller.rb
API JSON authentication with Devise
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else
@Br3nda
Br3nda / rspec_rails_cheetsheet.rb
Created September 19, 2016 06:01 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)