Skip to content

Instantly share code, notes, and snippets.

View claudiokc's full-sized avatar

Claudio Cáceres claudiokc

View GitHub Profile
@claudiokc
claudiokc / #wd-drop-file.py
Created May 24, 2022 16:16 — forked from florentbr/#wd-drop-file.py
Selenium - Drop a file from the desktop on a drop area
from selenium import webdriver
from selenium.webdriver.remote.webelement import WebElement
import os.path
# JavaScript: HTML5 File drop
# source : https://gist.github.com/florentbr/0eff8b785e85e93ecc3ce500169bd676
# param1 WebElement : Drop area element
# param2 Double : Optional - Drop offset x relative to the top/left corner of the drop area. Center if 0.
# param3 Double : Optional - Drop offset y relative to the top/left corner of the drop area. Center if 0.
# return WebElement : File input
cd one-ui
git pull ..
# VERSIONES tienen que coincidir package.json
[liu-onecampus-frontend]angular/package.json
[one-ui]projects/package.json
npm run package:one-ui-lib
[liu-onecampus-frontend]angular/$ npm install
[liu-onecampus-frontend]angular/$ ng build //--configuration=qa staging //--prod
cd one-ui
git pull ..
# VERSIONES tienen que coincidir package.json
[liu-onecampus-frontend]angular/package.json
[one-ui]projects/package.json
npm run package:one-ui-lib
[liu-onecampus-frontend]angular/$ npm install
[liu-onecampus-frontend]angular/$ ng build //--configuration=qa staging //--prod
#########
from google.cloud import pubsub_v1
from django.conf import settings
import os
import json
profile = os.path.join(settings.BASE_DIR, 'pubsub/service_account_profile.json')
search = os.path.join(settings.BASE_DIR, 'pubsub/service_account_search.json')
function FindProxyForURL(url, host)
{
return "SOCKS5 192.168.2.1:8086; SOCKS 192.168.2.1:8086";
}
@claudiokc
claudiokc / wagtail
Last active December 6, 2018 21:00
# Borrar el pk de auth.user
./manage.py dumpdata auth --exclude=auth.permission --output=../prodAuth.json
./manage.py dumpdata --indent=4 --all --natural-foreign --verbosity=3 --output=../prodAll.json --exclude=wagtailcore.pagerevision --exclude=wagtailcore.grouppagepermission --exclude=wagtailcore.groupcollectionpermission --exclude=auth --exclude=sessions
# El problema con los content_types es en las revisiones de wagtail "model": "wagtailcore.pagerevision",
export http_proxy=socks5://127.0.0.1:8086 https_proxy=socks5://127.0.0.1:8086