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
// GLOBALS | |
//Array of file extension which you would like to extract to Drive | |
var fileTypesToExtract = ['pdf', 'xml']; | |
//Name of the folder in google drive i which files will be put | |
var folderName = 'LabelMOD'; | |
//Name of the label which will be applied after processing the mail message | |
var labelName = 'LabelMOD'; | |
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
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(reset)%C(bold yellow)%d%C(reset)' --all" |
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 os import listdir | |
from os.path import isfile, join | |
MY_DIR = 'Q:\\midir' | |
def execute(): | |
onlyfiles = [f for f in listdir(MY_DIR) if isfile(join(MY_DIR, f))] | |
print(onlyfiles) | |
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 fnmatch | |
import os | |
MY_DIR = 'Q:\\my_dir\\sub_dir' | |
FILE_EXT = 'xml' | |
def filter_files_by_ext(dir, filter_ext): | |
files = [file for file in os.listdir(dir) if fnmatch.fnmatch(file, '*.%s' % filter_ext)] | |
return files |
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
# Eliminamos cache de git | |
git rm -r --cached . | |
# Agregamos nuevamente archivos | |
git add . |
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
"".join([f"{ord(x):03}" for x in "Mysuperstring"]) |
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
sudo mount.cifs //172.19.39.33/d$ /mnt/servers/33-D -o user=admin,pass='my_super_password' |
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
sudo apt-add-repository -y ppa:teejee2008/ppa | |
sudo apt update | |
sudo apt install timeshift |
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 React, { useRef, useEffect } from 'react'; | |
const useComponentWillMount = func => { | |
const willMount = useRef(true); | |
useEffect(() => { | |
willMount.current = false; | |
}, []); | |
if (willMount.current) { func(); } |
OlderNewer