Skip to content

Instantly share code, notes, and snippets.

@cztomczak
cztomczak / setcookie.py
Created May 18, 2020 20:48
Cookie domain crash
"""
Shows how to set a cookie.
"""
from cefpython3 import cefpython as cef
import datetime
def main():
cef.Initialize()
@cztomczak
cztomczak / install-docker-ubuntu1404.sh
Last active September 29, 2019 08:43
Install Docker on Ubuntu 14.04
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install docker-engine
# Set permissions. Restart is required.
sudo usermod -aG docker $USER
# Docker version/info
docker -v
@cztomczak
cztomczak / install-docker-exp.sh
Last active August 30, 2019 09:22 — forked from katopz/install-docker-exp.sh
Install Docker on Ubuntu 14.04.4 x64
# Install Docker on Ubuntu 14.04.4 x64
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# No interactive for now.
export DEBIAN_FRONTEND=noninteractive
# Update your APT package index.
sudo apt-get -y update
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get -y install apt-transport-https ca-certificates
# Add the new GPG key.
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@cztomczak
cztomczak / pyopengl-cef-demo.py
Created January 8, 2018 12:51 — forked from AnishN/pyopengl-cef-demo.py
PyOpenGL + CEF Python Demo: Play with the controls to change some properties about the spinning triangle in the background! The triangle rendering uses PyOpenGL, while the UI rendering and input use CEF Python.
from cefpython3 import cefpython as cef
import sys
import pygame
from PIL import Image
from OpenGL.GL import *
from OpenGL.GLU import *
import inspect
import math
class CEFSettings:
# CEFPYTHON
# example of how to do a "connection" overriding using an
# external library (eg: urllib3) instead of internal netwkork
# library of chromium
#
# Massimiliano Dal Cero - max<A_T>yatta<D_O_T>it
from cefpython3 import cefpython as cef
import platform
import sys
@cztomczak
cztomczak / local_ip.py
Created January 27, 2012 18:06
Python local IP
import socket
print socket.gethostbyname(socket.gethostname())