Skip to content

Instantly share code, notes, and snippets.

Working Hard Ya !

Sóstenes Apollo sostenesapollo

Working Hard Ya !
View GitHub Profile
View zshrc
# LS_COLORS=$LS_COLORS:'ow=01;34:' ; export LS_COLORS
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/sostenes/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
View ScrollDown.js
const scrollDown = () => {
try {
var chatWindow = document.getElementById("div-id")
var xH = chatWindow.scrollHeight
chatWindow.scrollTo(0, xH)
} catch (e) {
console.log('Erro ao scrolar ou encontrar a div');
View Dashboard.tsx
import React from 'react';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import Drawer from '@material-ui/core/Drawer';
import Box from '@material-ui/core/Box';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import List from '@material-ui/core/List';
import Typography from '@material-ui/core/Typography';
View tabetizr.js
* TODO Tabletizer is a simple js module to help
* TODO devs to build tables very fast with pagination, search and crud options.
* ! 1- The ajax Data needs to be an object with two params
** Response example:
** [
** { totalRows:x, totalRowsThisPage:x }
** [
** { id:1, name: "asd"},
View nothing.txt
View pandas commands
import pandas as pd
dataset1 = pd.read_table("",sep="|")
dataset2 = pd.read_table("",sep="|", header=None, names=user_cols,skipfooter=1)
user_cols = ['a','b','c','d','number']
View pagination.js
function paginate(id, qnt_total, pg_atual) {
let qnt_paginas = Math.ceil(qnt_total / config[id].querydefault.limit);
if(pg_atual > qnt_paginas){
pg_atual = qnt_paginas
var lateral = 2
var btns = ''
var pagina = `
sostenesapollo / dropbox.js
Created Feb 3, 2020
View dropbox.js
var fs = require('fs')
var request = require('request')
function save (filename, userCode, file){
return new Promise((resolve, reject)=>{
var content = fs.readFileSync(filename);
options = {
method: "POST",
url: '',
View services.html
<!DOCTYPE html>
<html lang="pt-br">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
sostenesapollo / download.js
Created Jan 24, 2020 — forked from mbejda/download.js
Download Private Github Repo with Node.js Request module
View download.js
var owner = "mbejda";
var repo = "somerepo";
var branch = "master"
var accessToken = "AccessToken";
var options = {
method: "GET",
url: `${owner.toLowerCase()}/${repo.toLowerCase()}/tarball/${branch}?access_token=${accessToken}`,
headers: {
'Accept': 'application/vnd.github.v3.raw',