Skip to content

Instantly share code, notes, and snippets.

View curreta's full-sized avatar
📷
Focused

Carlos Urreta curreta

📷
Focused
View GitHub Profile
@steven2358
steven2358 / ffmpeg.md
Last active April 19, 2024 05:16
FFmpeg cheat sheet
@SeanMcGrath
SeanMcGrath / poshmark-share
Last active March 26, 2024 00:53
JS code to share all items in a poshmark closet to followers and all available events
const clickDelta = 4000; // ms delay between clicks
const cycleDelta = clickDelta * 100; // ms delay between share cycles
const clickLinks = (el) => {
el.click();
// set a short timeout so there's time to load in the active parties/render the modal
setTimeout(() => {
document
.querySelectorAll("[data-et-name='share_poshmark']")
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active April 14, 2024 14:27
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active March 7, 2024 03:56
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@harperreed
harperreed / DownloadStationAPI.py
Last active January 4, 2022 08:13
example script to sync/download/etc put.io downloads to your synology download station
import time
import requests
import json
class DownloadStationAPI():
def __init__(self, host=None, username=None, password=None):
self.name = 'DownloadStation'
@thijsc
thijsc / gist:1391107
Created November 24, 2011 11:08
Select item from chosen js select with Capybara and Selenium
def select_from_chosen(item_text, options)
field = find_field(options[:from])
option_value = page.evaluate_script("$(\"##{field[:id]} option:contains('#{item_text}')\").val()")
page.execute_script("$('##{field[:id]}').val('#{option_value}')")
end