Skip to content

Instantly share code, notes, and snippets.

View araujodavid's full-sized avatar

David Araújo araujodavid

View GitHub Profile
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active June 19, 2024 14:20
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@lucaspg96
lucaspg96 / bot.py
Last active November 25, 2021 10:18
A python script to send messages to a telegram user. Useful to notify when long scripts are finished!
#This script is independet of lib or python version (tested on python 2.7 and 3.5)
import telegram
#token that can be generated talking with @BotFather on telegram
my_token = ''
def send(msg, chat_id, token=my_token):
"""
Send a mensage to a telegram user specified on chatId
chat_id must be a number!
<%@page import="javax.naming.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JNDI Resources</title>
</head>
<body>
<h1>JNDI Resources</h1>
@lukas-h
lukas-h / license-badges.md
Last active June 18, 2024 08:05
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@staltz
staltz / introrx.md
Last active June 21, 2024 12:27
The introduction to Reactive Programming you've been missing
@regispires
regispires / jboss
Last active August 29, 2015 13:56
Script de inicialização do JBoss a ser usado em /etc/init.d/jboss. Adaptado de /opt/jboss/bin/jboss_init_redhat.sh.
#!/bin/sh
# JBoss Control Script
# To use this script run it as root - it will switch to the specified user
# Here is a little (and extremely primitive) startup/shutdown script
# for RedHat systems. It assumes that JBoss lives in /usr/local/jboss,
# it's run by user 'jboss' and JDK binaries are in /usr/local/jdk/bin.
# All this can be changed in the script itself.
# Either modify this script for your requirements or just ensure that
# the following variables are set correctly before calling the script.
#define where jboss is - this is the directory containing directories log, bin, conf etc

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: