Skip to content

Instantly share code, notes, and snippets.

View leodutra's full-sized avatar
🦙
Llama and other LLMs

Leo Dutra leodutra

🦙
Llama and other LLMs
View GitHub Profile
@leodutra
leodutra / mad-node-modules.md
Created January 27, 2017 03:34
Awesome and mad Node modules collection

peer-to-peer

  • peerwiki - all of wikipedia on bittorrent
  • simple-peer - send video/voice/data p2p in the browser (with webrtc)
  • torrent-docker - realtime boot of remote docker images over bittorrent
  • torrent-mount - mount a torrent as a filesystem
  • webtorrent - streaming torrent client for node & the browser

browserify

@leodutra
leodutra / arch-install.sh
Last active July 21, 2022 03:48
Arch Install GPT + GRUB
# O live ISO do Arch é um CLI
# a instalação é iniciada como sudo automaticamente
# siga os passos...
# DEFINIR TECLADO ABNT2 PARA LIVE BOOT
loadkeys br-abnt2
# AUMENTAR FONTE DO TERMINAL DO LIVE BOOT
setfont lat4-19
@cryzed
cryzed / fix-infinality.md
Last active April 30, 2024 22:01
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@pylover
pylover / a2dp.py
Last active March 11, 2024 03:06
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@SalahAdDin
SalahAdDin / Steps.md
Last active May 29, 2022 06:11
Instlling React-Native Android Environment in ArchLinux

First step: Install Android SDK

  1. yaourt -S android-sdk android-sdk-platform-tools android-sdk-build-tools
    Note: Maybe you'll have problems with the lasta package: ncurses5-compat-libs. In order to avoid this problem you have to use this command: gpg --recv-keys F7E48EDB. You can find clarification here.
  2. yaourt -S genymotion
    Note: You'll need install virtual-box and his modules, yaourt will make for you but you need choos between ArchLinux host modules or DKMS host modules.
  3. Enter in super user mode with su - and then do echo -e "vboxdrv\nvboxnetflt\nvboxnetadp\nvboxpci" > /etc/modules-load.d/virtualbox.conf
    Note: You need do this with super user because need super user permissions and with sudo, for us at least, doesn't work.
  4. sudo modprobe vboxdrv vboxnetadp vboxnetflt
    Activate for current session.
  5. sudo chmod -R 777 /opt/android-sdk
@StickyCube
StickyCube / index.html
Created June 27, 2016 22:52
Electron click through transparency example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test App</title>
</head>
<style>
html, body {
height: 100%;
@leodutra
leodutra / setup-git-login-pass-cache.sh
Last active April 22, 2016 20:03
Setup Git login, e-mail and password cache | sudo wget -q -O - https://gist.github.com/leodutra/ad82f4d9e86083b5901f/raw | sh -x -
#!/bin/sh
git config --global credential.helper 'cache --timeout=3600'
git config --global user.name "Leo Dutra"
git config --global user.email "leodutra.br@gmail.com"
echo 'git has been set for leodutra.br@gmail.com'
@carlessanagustin
carlessanagustin / Nginx_Cheat_Sheet.md
Last active April 18, 2024 20:18
Nginx Cheat Sheet
@manuelbieh
manuelbieh / sequelize-schema-file-generator.js
Last active January 16, 2024 19:25
Automatically generates migration files from your sequelize models
import * as models from "models";
import Sequelize from "sequelize";
import fs from "fs";
delete models.default;
const sequelize = new Sequelize(
'',
'',
'', {
@leodutra
leodutra / CacheControlFilter.java
Last active November 8, 2015 14:13
Filtro para controle de cache de resources para Servlets 2.3+ (Websphere 5+)
/**/
package com.github.leodutra.filters;
import java.io.IOException;
import java.util.Date;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;