Skip to content

Instantly share code, notes, and snippets.

View marcosdalte's full-sized avatar

Marcos Dalte marcosdalte

View GitHub Profile
@marcosdalte
marcosdalte / docker_cheat_sheet
Last active July 21, 2023 15:34
docker cheat sheet
docker exec -it <container_id> /bin/bash
docker ps -a --filter "ancestor=nome-da-imagem"
@marcosdalte
marcosdalte / tips_power_shell.txt
Last active August 12, 2022 13:37
Useful Power Shell Commands
Linux
grep -rin ./dir/*.ext "foo foo"
PS
Select-String -path .\dir\*.ext -Pattern "foo foo"
Linux
tail -f file
PS
Get-Content -PATH .\file -Wait
@marcosdalte
marcosdalte / gitflow.md
Last active July 1, 2021 21:05 — forked from sheremetat/gitflow.md
Git rebase workflow

Step 1: Checkout a new working branch from updated master

 git checkout -b <branchname>

Step 2: Make Changes

 git add
 git commit -m "description of changes"

Step 3: Sync with remote

@marcosdalte
marcosdalte / flask_memcache.py
Created September 5, 2018 01:10 — forked from methane/flask_memcache.py
Sample using python-memcached in threaded Flask application.
"""Flask extension utility."""
from flask.sessions import SessionInterface, SessionMixin
from werkzeug.contrib.cache import MemcachedCache
import memcache # Use https://code.launchpad.net/~songofacandy/python-memcached/mixin-threading
def setup_cache(app):
"""
Setup ``app.cache``.
@marcosdalte
marcosdalte / format_data_exp_whois.c
Created May 30, 2016 00:36
Format Expiration Date from Whois to .br and .com
#include <stdio.h>
#include <string.h>
#include <time.h>
char *ret_num_month(char *nm_month);
char *ret_num_month(char *nm_month){
typedef struct param{
char *chave;
char *valor;
} param;
#include <stdio.h>
#include <string.h>
int main(){
printf("%s.%d\n",__FUNCTION__,__LINE__);
char pkg_code[6] = {"20gb"};
char unity[10];
char volume[10];
memset(unity,'\0',sizeof(unity));