.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const myObj = { | |
a: 1, | |
b:'foo', | |
c: '', | |
d: null, | |
e: undefined | |
}; | |
const removeEmpty = (obj) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
from cement import App | |
def find_occurences(stores, items, fpath=None): | |
print('find ocurrences') | |
for _id in items: | |
if fpath: |
$ git clone --mirror [email protected]:arquitectura.ss/solutions-management-app-mayorista-backend.git BE
$ cd BE
$ git remote set-url --push origin [email protected]:walmartretail/cvm-api.git
$ git push --mirror
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from functools import lru_cache | |
@lru_cache() | |
def task(a,b): | |
print('Init task') | |
time.sleep(2) | |
return a + b | |
task.cache_clear() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# using hashids-1.2.0 and python 2.7.* | |
from hashids import Hashids | |
hashids = Hashids("S4mpl3 H4sh", 16, "abcdefABCDEF1234567890") | |
download_token = '4061c00d07f7526356bb170233e229499df81fDc516c8de204' | |
sample = dict() | |
values = hashids.decode(download_token[32:]) |
To install this package you previously need install python3 in your host, I use Homebrew to do it.
$ brew install python3
Later you need download and install the python pip using python3 version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mysql:8.0.2 | |
RUN echo 'sql-mode=""' >> /etc/mysql/conf.d/docker.cnf | |
RUN echo 'secure_file_priv=""' >> /etc/mysql/conf.d/docker.cnf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xrandr --newmode "1440x900_59.90" 106.29 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync | |
xrandr --addmode VGA-1 1440x900_59.90 | |
xrandr --output VGA-1 --mode 1440x900_59.90 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.6-alpine3.6 | |
MAINTAINER Rafael Torres <[email protected]> | |
RUN apk add --update \ | |
mariadb-client-libs \ | |
mariadb-dev \ | |
gcc \ | |
musl-dev \ | |
bash \ |
NewerOlder