Skip to content

Instantly share code, notes, and snippets.

View Cristuker's full-sized avatar
:shipit:
Writing code

Cristian Silva Cristuker

:shipit:
Writing code
View GitHub Profile
@Cristuker
Cristuker / listarticles.js
Created September 30, 2024 12:54
list all articles from dev.to and save in md
const { writeFileSync} = require("node:fs");
async function getArticles(page) {
if (!page) page = 1;
const response = await fetch(`https://dev.to/api/articles?username=cristuker&page=${page}&per_page=100`);
if (!response.ok) {
throw new Error('Erro searching for articles');
}
const articles = await response.json()
return articles;
@Cristuker
Cristuker / utils-bash.sh
Last active September 3, 2021 17:53
Linux utils
# Get the process running on port 3333 and kill it! Change 3333 to use on another ports.
kill -9 "$(lsof -w -n -i tcp:3333 | awk 'FNR == 2 {print $2=$2}')"
@Cristuker
Cristuker / setting.json
Created March 8, 2021 22:34
Ulauncher setting - shortcut
{
...anothers settings,
"hotkey-show-app": "<Super>space"
}
@Cristuker
Cristuker / settings.json
Last active January 4, 2022 15:58
vscode config file
{
//Editor configs
"workbench.colorTheme": "Dracula",
"editor.fontLigatures": true,
"editor.fontFamily": "Fira Code",
"editor.fontWeight": "400",
"workbench.iconTheme": "material-icon-theme",
"editor.formatOnSave": true,
"diffEditor.ignoreTrimWhitespace": false,
"git.autofetch": true,
@Cristuker
Cristuker / purgeDocker.sh
Created July 11, 2020 15:29
Script to remove all files and images from your system when you need more space
#!/bin/bash
trap "exit" INT
docker image prune --all -f
docker container prune -f
docker volume prune -f
docker network prune -f
@Cristuker
Cristuker / .gitconfig
Last active June 13, 2022 11:26
My git configs
[user]
email = cristian123105@gmail.com
name = Cristian Silva
[core]
editor = code --wait
[alias]
s = !git status -s # git status whit less information
c = !git add --all && git commit -m #git add and git commit alias
l = !git log --pretty=format:'%C(blue)%h %C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr' #Format git log message
[includeIf "gitdir:~/work/"]
@Cristuker
Cristuker / .zshrc
Last active September 7, 2020 14:00
.zshrc
# 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/csilva/.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,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes