Skip to content

Instantly share code, notes, and snippets.

View lgallindo's full-sized avatar

Lucas Gallindo lgallindo

  • Pernambuco Federal University
  • Recife - PE, Brazil
View GitHub Profile
@nonamed01
nonamed01 / fuckForticlient.sh
Last active March 26, 2025 18:32
fuckForticlient, a command-line client to connect to SAML fortivpn servers by using openfortivpn and the --cookie-in-stdin parameter
#!/bin/bash
# Uncomment the following line to debug the script:
#set -x
#####################################################################################
# fuckForticlient.sh
#
# Script to authenticate against Fortinet SAML servers using Firefox and
# openfortivpn. This replaces Forticlient for GNU/Linux completely.
# Because openfortivpn does not support SAML login (yet), this script uses Firefox
# to authenticate, grabs SVPNCOOKIE and then calls openfortivpn to setup
@gcrsaldanha
gcrsaldanha / criar_imagem.py
Last active January 11, 2025 00:58
Criando imagens com Python (Pillow)
# Para mais conteúdos de Python, acesse: https://instagram.com/gabrielsaldanha.dev
# É necessário ter Pillow instalado:
# $ python3 -m pip install Pillow
from PIL import Image, ImageDraw, ImageFont
image = Image.new("RGB", (1080, 1080), color=(41, 46, 48))
img_draw = ImageDraw.Draw(image)
# Arquivo de fonte Helvetica.ttc deve estar no mesmo diretório
# que o programa está sendo executado
@ab-dx
ab-dx / iFetch
Created December 23, 2021 04:13
A simple sysfetch tool
#!/bin/bash
os=$(tail -n 1 /etc/lsb-release | sed s/DISTRIB_DESCRIPTION=//g | sed s/\"//g)
arch=$(uname -m)
editor=$EDITOR
shell=$SHELL
wm=$(wmctrl -m | head - -n 1 | sed s/Name\:\ //g)
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
@mahemoff
mahemoff / README.md
Last active April 21, 2025 08:35
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

@anedward01
anedward01 / Edit_Repack_ISO_tutorial.md
Last active March 15, 2025 21:43 — forked from AkdM/Edit_Repack_ISO_tutorial.md
Edit and repack .iso bootable image

On Linux

Installing mkisofs

apt-get install mkisofs

Editing ISO image

mkdir /tmp/custom_iso

@ablakely
ablakely / README.md
Last active January 26, 2025 10:20
i3wm theme: Vaporwave

i3wm theme: Vaporwave

screenshot


Written by Aaron Blakely

@kylehounslow
kylehounslow / client.py
Last active April 23, 2024 10:58
Send and receive images using Flask, Numpy and OpenCV
from __future__ import print_function
import requests
import json
import cv2
addr = 'http://localhost:5000'
test_url = addr + '/api/test'
# prepare headers for http request
content_type = 'image/jpeg'
#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me
PID=$(pgrep -u USER gnome-session-b)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH'
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)'
@lgallindo
lgallindo / .gitignore
Created May 27, 2016 17:34 — forked from kogakure/.gitignore
Git: .gitignore file for LaTeX projects
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
@arjunvenkat
arjunvenkat / gist:1115bc41bf395a162084
Last active January 12, 2024 05:04
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.