Skip to content

Instantly share code, notes, and snippets.

View DarkPhoenix6's full-sized avatar

Chris Fedun DarkPhoenix6

View GitHub Profile
@sylvainpelissier
sylvainpelissier / pyuac.py
Last active March 20, 2023 23:28 — forked from Preston-Landers/pyuac.py
pyuac - elevate a Python process with UAC on Windows compatible Python 3.
#!/usr/bin/env python
# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4
"""User Access Control for Microsoft Windows Vista and higher. This is
only for the Windows platform.
This will relaunch either the current script - with all the same command
line parameters - or else you can provide a different script/program to
run. If the current user doesn't normally have admin rights, he'll be
@nickoala
nickoala / 0_python_email.md
Last active April 29, 2024 05:54
Use Python to send and receive emails

Use Python to:

  • send a plain text email
  • send an email with attachment
  • receive and filter emails according to some criteria
@mishurov
mishurov / syntax.s
Last active May 5, 2024 02:09
AT&T assembly syntax and IA-32 instructions
# --------
# Hardware
# --------
# Opcode - operational code
# Assebly mnemonic - abbreviation for an operation
# Instruction Code Format (IA-32)
# - Optional instruction prefix
# - Operational code
@gubatron
gubatron / compiling_building_c_cpp_notes.md
Last active April 18, 2024 07:58
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Last update on December 14, 2023

Updated on February 27, 2023

Updated August 29, 2019.

@lirenlin
lirenlin / build-gcc.md
Last active October 1, 2023 16:57
build cross arm-gcc with newlib

##Set environment variables

export TARGET=aarch64-none-elf
export PREFIX=/work/public/$TARGET
export PATH=$PATH:$PREFIX/bin

##Build binutils

mkdir build-binutils
cd build-binutils
@ctokheim
ctokheim / cython_tricks.md
Last active March 4, 2024 23:27
cython tricks

Cython

Cython has two major benefits:

  1. Making python code faster, particularly things that can't be done in scipy/numpy
  2. Wrapping/interfacing with C/C++ code

Cython gains most of it's benefit from statically typing arguments. However, statically typing is not required, in fact, regular python code is valid cython (but don't expect much of a speed up). By incrementally adding more type information, the code can speed up by several factors. This gist just provides a very basic usage of cython.

@iori-yja
iori-yja / gist:9271860
Created February 28, 2014 14:19
Build cross compiler with newlib.
export PREFIX=/usr/local/$TARGET
export TARGET=arm-none-eabi-newlib
# build binutils
wget http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2
tar xf binutils-2.24.tar.bz2
mkdir b-binutils
cd b-binutils
../binutils-2.24/configure --prefix=$PREFIX --program-prefix=arm-none-eabi- --target=arm-eabi --enable-lto --enable-interwork --enable-multilib
make -j5