Skip to content

Instantly share code, notes, and snippets.

View nerijunior's full-sized avatar

Neri J. Jakubowski Jr. nerijunior

View GitHub Profile
@luciotbc
luciotbc / sidekiq_hacks.md
Last active February 1, 2023 15:29
sidekiq hacks

Sidekiq

Infra

Parando o sidekiq usando o rails (recomendado)

ps -ef | grep sidekiq | grep busy | grep -v grep | awk '{print $2}' > tmp/sidekiq.pid
cat tmp/sidekiq.pid
bundle exec sidekiqctl stop tmp/sidekiq.pid
@jackblack369
jackblack369 / mysql.md
Last active July 13, 2023 01:14
[mysql] #mysql
  • the size of blob column
     A BLOB can be 65535 bytes (64 KB) maximum.
     If you need more consider using:
     a MEDIUMBLOB for 16777215 bytes (16 MB)
     a LONGBLOB for 4294967295 bytes (4 GB).
    
  • join sql
  • string convert to timstamp
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active July 14, 2024 19:55
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@ebuildy
ebuildy / Dockerfile
Created January 25, 2016 10:25
Install Php 7 with MongoDB driver on Docker from Ubuntu trusty base image.
FROM ubuntu:trusty
ENV HOME /root
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN add-apt-repository ppa:ondrej/php && \
apt-get update
@ajcastro
ajcastro / phpcs-user-settings
Last active March 3, 2019 03:39
My Phpcs User Settings
{
"phpcs_additional_args": {
"--standard": "PSR2",
"--exclude": "Generic.Files.LineEndings",
"-n": ""
},
// PHP_CodeSniffer settings
"phpcs_command_on_save": false,
"phpcs_executable_path": "/usr/bin/phpcs",
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();