Skip to content

Instantly share code, notes, and snippets.

View ceelsoin's full-sized avatar
🏠
Working from home

Celso Inácio ceelsoin

🏠
Working from home
View GitHub Profile
@ceelsoin
ceelsoin / index.js
Created August 24, 2020 14:59 — forked from akexorcist/index.js
Axios post method requesting with x-www-form-urlencoded content type
const axios = require('axios')
const qs = require('querystring')
...
const requestBody = {
name: 'Akexorcist',
age: '28',
position: 'Android Developer',
description: 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/',
@ceelsoin
ceelsoin / bench.js
Created August 17, 2020 13:47 — forked from billywhizz/bench.js
node.js static file serving benchmark
var TCP = process.binding("tcp_wrap").TCP;
var Buffer = process.binding("buffer").SlowBuffer;
var HTTPParser = process.binding("http_parser").HTTPParser;
function setupSocket(peer) {
function shutdownHandler(status, handle, req) {
// TODO: ensure we only shutdown once
if(status != 0) {
if(peer.onerror) {
var err = new Error("shutdown");
#!/bin/bash
#Backup_Directory_Locations
BACKUPROOT="/var/www/backups_diarios"
TSTAMP=$(date +"%d-%b-%Y-%H:%M")
S3BUCKET="approvedemailplatformsso-${domain}"
TSTAMP=$(date +"%d-%b-%Y-%H:%M")
zip -r /var/www/backups_diarios/$TSTAMP.html.zip /var/www/html/
# Move file from server to your S3 bucket
@ceelsoin
ceelsoin / students.py
Created May 24, 2020 18:27
Mentoria hackingrio
import sqlite3
conn = sqlite3.connect('estudantes.db')
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS students(
UserID VARCHAR(20) NOT NULL,
username VARCHAR(60) NOT NULL,
firstname VARCHAR(60) NOT NULL,
email VARCHAR(60) NOT NULL,
@ceelsoin
ceelsoin / README.md
Last active March 30, 2020 18:27 — forked from mosquito/README.md
Add mariadb or other docker-compose as a systemd unit

MariaDB (or others) Docker compose as a systemd unit

Install docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
2020-02-11 21:33:37.361 26006-26036/com.cdnbye.cdnbye_example I/flutter: [Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories', Instance of 'StreamCategories']
2020-02-11 21:33:48.394 26006-26036/com.cdnbye.cdnbye_example I/flutter: Original URL: http://tv.minhalista.me/live/rubenstest5000/rubenstest5001/3709
@ceelsoin
ceelsoin / package.json
Last active December 26, 2019 16:23
arquitetura-limpa-node-typescript-medium
{
"name": "blog-service",
"version": "1.0.0",
"main": "server.js",
"scripts": {
"test": "jest",
"dev": "nodemon --watch \"src/\" --exec \"ts-node src/server.ts\" -e ts",
"build": "rm -r -f ./dist && tsc && cp package.json ./dist/package.json && cp .env ./dist/.env"
},
"dependencies": {
@ceelsoin
ceelsoin / media-query.css
Created December 7, 2019 15:18 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@ceelsoin
ceelsoin / public-stun-list.txt
Created October 26, 2019 20:03 — forked from mondain/public-stun-list.txt
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.