Skip to content

Instantly share code, notes, and snippets.

View fdv's full-sized avatar
🚀
Taking over the world

Fred de Villamil fdv

🚀
Taking over the world
View GitHub Profile
@fdv
fdv / genshinroutine.md
Created January 24, 2023 09:37
Genshin Impact Daily Routine:

Every Day

  • Do my commissions
  • Teleport to Mondstadt
    • Adventure guild
      • Claim adventure rank reward
      • Dispatch character on expedition
    • Blacksmith
      • Claim order from yesterday
  • Ask about ore
@fdv
fdv / startup101.md
Last active December 9, 2020 10:30
Startup 101

So, building a startup is "easy". Building a company is hard. Dropping the most obvious things. Gist so I can update it and you see the diff.

What you must know

  • No one will take you seriously unless you have your first 20 paying customers. This includes raising money. Unless you already built a successful startup in the past.
  • You don't need a business cofounder if you feel yourself able to find your 20 first customers.
  • Your lawyer and your accountants are your best friend. Even regarding your relationship with your cofounder.
  • If you start dating one of your company C-level, and have raised money already, you'll have to tell your investors, and they might force one of you out. I know, this seems odd in a "startup HOWTO" but believe me, I put that here for a reason.
  • If you want to do business with the US, then the CEO must live in the US (might change after COVID though) or no one will take you seriously.
  • Don't target corporations unless you know how they work. If you don't have a deal after the
@fdv
fdv / usecase.go
Created February 25, 2020 12:07
Use case
package main
import "fmt"
func printString(foo string) {
fmt.Println(foo)
}
func printLen(foo string) {
fmt.Println(len(foo))
@fdv
fdv / table-size.sql
Created February 19, 2020 14:26
MySQL breakdown of table size between data and index
SELECT
ROUND(SUM(DAT) /1024/1024/1024, 2),
ROUND(SUM(NDX) /1024/1024/1024, 2),
TBL
FROM
(
SELECT TBLN, DAT,NDX,TBL,IF(px>4,4,px) pw1,IF(py>4,4,py) pw2,IF(pz>4,4,pz) pw3
FROM
(
SELECT table_name TBLN, data_length DAT,index_length NDX,data_length+index_length TBL,
@fdv
fdv / .tmux.conf
Last active November 4, 2020 15:32
Emoji / UTF-8 in IRSSI with tmux. Tested on FreeBSD 11.3 with zsh 5.6.2, tmux 2.7 and irssi 1.1.1 or later
#
set -g default-terminal screen-256color
set -g status-bg blue
set -g status-fg white
set -g status-right '#(sysctl vm.loadavg)'
setw -g window-status-current-attr underscore
bind r source-file ~/.tmux.conf

Keybase proof

I hereby claim:

  • I am fdv on github.
  • I am fdevillamil (https://keybase.io/fdevillamil) on keybase.
  • I have a public key ASAilsSLOYy1hcdeBrJCAix4CRR4YFJpEsf46JZAkt6qLAo

To claim this, I am signing this object:

@fdv
fdv / Install.md
Last active April 16, 2018 10:00
Dhclient6 for FreeBSD configuration

Install the package

pkg install isc-dhcp43-client

/etc/rc.conf

ipv6_enable_all_interfaces="YES"
@fdv
fdv / persistent.sh
Created December 1, 2017 15:37
Persistent settings
curl -XPUT 'http://cluster:9200/_cluster/settings?master_timeout=12000s' -d '{
"persistent" : {
"cluster.routing.allocation.disk.threshold_enabled" : true,
"cluster.routing.allocation.disk.watermark.low" : "78%",
"cluster.routing.allocation.disk.watermark.high" : "79%"
}
}'
if [ -f "${LOCK_FILE}" ]; then
log_error "A backup is already running with pid $(cat ${LOCK_FILE})"
echo $$ > "${LOCK_FILE}"
if [ $? -gt 0 ]; then
log_error "Error: could not create lock file, exiting"
fi
fi
# do all the logic here
#!/bin/bash
SWAP_SIZE=4g
TEMP_ROOT_PASSWORD="53nD0tt3rP1c5"
# Partition table
mfiutil delete mfid0
for drive in $(mfiutil show drives | grep -v SSD | awk '{print $1}'); do
mfiutil create jbod $drive