Skip to content

Instantly share code, notes, and snippets.

View UlisesGascon's full-sized avatar
😎
Focus on FOSS Projects!

Ulises Gascón UlisesGascon

😎
Focus on FOSS Projects!
View GitHub Profile
@UlisesGascon
UlisesGascon / example.py
Created October 24, 2022 12:56 — forked from eddieantonio/example.py
Zero-dependency Python 3 and Node IPC using UNIX sockets
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import socket
import json
server_address = '/tmp/example.sock'
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(server_address)
@UlisesGascon
UlisesGascon / commands_docusaurus_translation.md
Created July 7, 2022 13:44 — forked from FedericoTartarini/commands_docusaurus_translation.md
Source code for the YouTube video - Translate a Docusaurus website in multiple languages with its internationalization (i18n) support.

Initialize a new site

with npx @docusaurus/init@latest init website classic

Configure your site

i18n: {
    defaultLocale: 'en',
    locales: ['en', 'it'],
    localeConfigs: {
      en: {
@UlisesGascon
UlisesGascon / README.MD
Created June 7, 2022 06:30 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@UlisesGascon
UlisesGascon / nvm_zsh.md
Created April 7, 2022 08:16
nvm in zsh always available
  1. git clone https://github.com/lukechilds/zsh-nvm ~/.oh-my-zsh/custom/plugins/zsh-nvm
  2. Add the zsh-nvm plugin to your .zshrc folder

Full guide

@UlisesGascon
UlisesGascon / THANKS.md
Created January 6, 2022 19:01
Thank you! 💖

Thanks to all of you for making *.ulisesgascon.com possible

Special Thanks

Nextjs based subdomains

@UlisesGascon
UlisesGascon / do_setup.sh
Last active December 23, 2020 09:02
Digital Ocean with Docker Compose a Nodejs
#!/bin/sh
echo "START: Installing dependencies for Node, Docker and Docker Compose in DO"
cd /home
mkdir WORKSPACE
cd WORKSPACE
# Nodejs
# https://github.com/nodesource/distributions/blob/master/README.md
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
@UlisesGascon
UlisesGascon / database_magic.md
Created August 20, 2020 06:06
Dump, compare and check db integrity

Database Backup and comparation

Dump Postgres DB

pg_dump --data-only --inserts -h <DB_URL> -U <DB_USER> -f <FILE_NAME_TO_CREATE.sql> <DB_NAME>

Notes:

  • --data-only will dump only data to be inserted (not tables strcuture and relations)
  • --inserts will force to use INSERT statements and not COPY to avoid driver issues later on
@UlisesGascon
UlisesGascon / hack.sh
Last active March 6, 2020 11:48
David hasselhoff wallpaper 2020
#!/bin/sh
npm install --global wallpaper-cli
wallpaper https://octodex.github.com/images/privateinvestocat.jpg --scale=fit
npm uninstall --global wallpaper-cli
@UlisesGascon
UlisesGascon / important.md
Last active February 12, 2020 07:57
Nodejs February Security Release
@UlisesGascon
UlisesGascon / deps.sh
Created February 5, 2020 16:45
just a simple script to simulate node v0.10 in Express for CI in local
#!/usr/bin/env bash
nvm use v0.10
#find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
npm install
npm config set shrinkwrap false
npm rm --silent --save-dev connect-redis
npm install --silent --save-dev mocha@3.5.3
npm install --silent --save-dev supertest@2.0.0
npm prune