Skip to content

Instantly share code, notes, and snippets.


alincmt ClimenteA

View GitHub Profile
eldadfux /
Last active Jan 30, 2021
Installation of Appwrite server
mkdir appwrite-ce && \
cd appwrite-ce && \
curl -o docker-compose.yml && \
docker-compose up -d --remove-orphans
ur0n2 /
Created May 10, 2017
Clipboard copy & paste with python
import sys
import ctypes
OpenClipboard = ctypes.windll.user32.OpenClipboard
EmptyClipboard = ctypes.windll.user32.EmptyClipboard
GetClipboardData = ctypes.windll.user32.GetClipboardData
SetClipboardData = ctypes.windll.user32.SetClipboardData
CloseClipboard = ctypes.windll.user32.CloseClipboard
View Django and Python 3 in Amazon Lightsail
sudo apt-get update
sudo apt-get install python3-pip python3-dev libpq-dev postgresql postgresql-contrib nginx
sudo -u postgres psql
- paste this code in postgres console:
CREATE DATABASE django_project;
CREATE USER username WITH PASSWORD 'pass1234';
ALTER ROLE username SET client_encoding TO 'utf8';
ALTER ROLE username SET default_transaction_isolation TO 'read committed';
renaudtertrais / zip.js
Created Jul 5, 2016
A simple ES6 zip function
View zip.js
const zip = (arr, ...arrs) => {
return, i) => arrs.reduce((a, arr) => [...a, arr[i]], [val]));
// example
const a = [1, 2, 3];
const b = [4, 5, 6];
const c = [7, 8, 9];
subfuzion /
Last active Apr 11, 2021
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

deanhume / XHR-request.js
Created Aug 19, 2015
A simple XHR request
View XHR-request.js
function successListener() {
var data = JSON.parse(this.responseText);
function failureListener(err) {
console.log('Request failed', err);
var request = new XMLHttpRequest();
mrkline /
Last active Mar 28, 2021
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • Single-line comments are started with //. Multi-line comments are started with /* and ended with */.

  • C# uses braces ({ and }) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,

chriskiehl / Vitual keystroke example
Created Jun 10, 2012
Python win32api simple Vitual keystroke example
View Vitual keystroke example
#Giant dictonary to hold key name and VK value
VK_CODE = {'backspace':0x08,