Skip to content

Instantly share code, notes, and snippets.

View olivierlacan's full-sized avatar

Olivier Lacan olivierlacan

View GitHub Profile
# Vars
ROOT=/workspace
SD_DIR=sd
MODEL_DIR=$ROOT/$SD_DIR/models/Stable-diffusion
VENV=env
GRADIO_AUTH=user:password123
SD_REPO=https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
# Install packages
apt update
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@jheasly
jheasly / get_the_API.py
Last active March 9, 2021 01:01
An example of from using Python to get the API behind a Tableau site, rather than scraping the HTML. Per the author, Jeremy J. Bowers, it will work for any Tableau vizql implementation, with a bit of URL substitution.
# Related, from News Nerdery thread:
#
# aricchokey 2 hours ago
# @ejmurra Looks like another way to grab the data is by tacking on a ".csv" at the end of the chosen sheet. It will
# return the delimited version of the data/trigger the download from Tableau, too.
# Like https://bi.ahca.myflorida.com/t/ABICC/views/Public/HospitalBedsHospital.csv or
# https://bi.ahca.myflorida.com/t/ABICC/views/Public/ICUBedsCounty.csv. Might get rid of the need for a payload
# in your script.
from bs4 import BeautifulSoup

I was asked to share a few memories of Jim Weirich as someone prepared for a conference talk about him, so I figured I'd share what came to mind here:

  1. My cofounder Todd Kaufman would often refer to Jim as the "Santa Claus of the Ruby community". He was a big, jolly guy and he always brought joy to every room he was in. If people take away one thing to know about Jim, it's that even when he had 30 years of experience on someone, he always treated them with tremendous deference and respect. He always approached my ideas and questions as if they were urgent and fascinating, even if he'd encountered them dozens of times before. It's a trait I strive to imitate whenever I meet people at a user group or a conference, because it made such an impact on me when someone that I looked up to treated me like my experiences mattered to them.

  2. I would sometimes drive 2 hours from Columbus to Cincinnati just to hang out at Jim's office. No matter what client work he had to do, he was never too busy for me. I remember

@simpsoka
simpsoka / Leadership-CI.md
Last active December 20, 2023 15:40
This is a list of questions to check our decision making.

Do I want to die on this hill?

  • Pass: This is morally good and if not handled has long term consequences
  • Fail: This if self serving

Am I including everyone?

  • Pass: My ego is not driving this conversation
  • Fail: The people in this conversation will only tell me I'm right and not push back
@FradSer
FradSer / iterm2_switch_automatic.md
Last active March 28, 2024 00:04
Switch iTerm2 color preset automatic base on macOS dark mode.

The latest beta (3.5) includes separate color settings for light & dark mode. Toggling dark mode automatically switches colors.

Vist iTerm2 homepage or use brew install iterm2-beta to download the beta. Thanks @stefanwascoding.


  1. Add switch_automatic.py to ~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch with:
@theparticleman
theparticleman / setup.sh
Last active October 6, 2017 18:07
Raspberry Pi robot setup
#!/bin/bash
# Change keyboard layout
#sudo raspi-config, 4 - Localization, 3 - Change keyboard layout,
# Enable SSH
#sudo raspi-config, 5 - Interfacing Options, 2 - SSH
# Enable Camera
#sudo raspi-config, 5 - Interfacing Options, 1 - Camera

Introduction

Sometimes you may want to use a DNS server for specific domain requests and another DNS server for all other requests. This is helpful, for instance, when connected to a VPN. For hosts behind that VPN you want to use the VPN's DNS server but all other hosts you want to use Google's public DNS. This is called "DNS splitting."

Here, we run dnsmasq as a background service on macOS. The dnsmasq configuration described below implements DNS splitting.

Install

brew install dnsmasq
@sergeyklay
sergeyklay / phpenv-install.md
Last active March 3, 2024 10:45
Multiple PHP versions using phpenv and php-build

Multiple PHP versions using phpenv and php-build

Install dependecies

Debian/Ubuntu users

sudo apt install \
  autoconf \
  bison \
@andrew
andrew / rubygems_with_changelogs.md
Last active May 11, 2017 17:03
Rubygems with a changelog.* file in their source repository, ordered by highest SourceRank
Gem name Source Repository url changelog filename
bundler http://github.com/bundler/bundler/ CHANGELOG.md
rubocop https://github.com/bbatsov/rubocop CHANGELOG.md
httparty http://github.com/jnunemaker/httparty History.md
rspec-rails https://github.com/rspec/rspec-rails Changelog.md
minitest https://github.com/seattlerb/minitest History.rdoc
sinatra http://github.com/sinatra/sinatra CHANGELOG.md
rdoc https://github.com/rdoc/rdoc History.rdoc
devise http://github.com/plataformatec/devise CHANGELOG.md