Skip to content

Instantly share code, notes, and snippets.

from github import Github
g = Github('xyAAAXcXACZYBx2YybC1zAzCxAYxc1Cxyz2AByb2')
repo = g.get_repo('sandbox/gh_api')
with open('dataset.csv', 'r') as file:
data = file.read()
repo.create_file('data/dataset.csv', 'upload csv', data, branch='main')
@max-arnold
max-arnold / SALT-EXTENSION.md
Created March 27, 2024 05:07
Salt extension development environment

Here is how I set up my extension development environment on Ubuntu 22.04:

git config --global user.name "Name"
git config --global user.email "email@example.com"
git clone git@github.com:USER/saltext-my.git
cd saltext-my
sudo apt install python3-venv python3-dev build-essential python3-wheel python3-wheel-whl
python3 -m venv .venv
source .venv/bin/activate
@ClavijoJaider
ClavijoJaider / Empleado.java
Last active May 18, 2024 23:23
Proyecto 3 Apo 2, paquete estructural Empleado.java, paquete servicios ServiciosEmpleado.java
package estructural;
public class Empleado
{
public static String ESTADO_ACTIVO = "ACTIVO ";
public static String ESTADO_INACTIVO = "INACTIVO";
private int identificacion;
private String nombre;
@alphasider
alphasider / woo_add_product_programmatically.php
Created September 21, 2020 11:23
Add woocommerce product programmaticaly (with attributes)
<?php
/**
* SOURCE: https://stackoverflow.com/questions/52937409/create-programmatically-a-product-using-crud-methods-in-woocommerce-3
*/
/* THE CODE FUNCTION */
// Custom function for product creation (For Woocommerce 3+ only)
function create_product( $args ){
global $woocommerce;
@krcm0209
krcm0209 / README.md
Last active May 18, 2024 23:02
Using AdGuard DNS over HTTPS (DoH) on Windows 11

Why

You may want to use AdGuard's DNS over HTTPS[^2] service if you

  1. Want to make it harder for your ISP to know what websites you are requesting
  2. Want to block most traditional ads from your web browsing experience across your entire PC

Setup instructions

  1. Open PowerShell
@leocomelli
leocomelli / git.md
Last active May 18, 2024 22:30
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 18, 2024 21:57
Files for PlayStation BIOS Files NA-EU-JP
@eenblam
eenblam / linux_reading_list.md
Last active May 18, 2024 21:39
Linux Networking Reading List

Linux Networking Reading List

Currently in no particular order. Most of these are kind of ancient.

Where's all the modern documentation? So much of what I've turned up searching is other folks complaining about having few options beyond reading source code.

The OREILLY books, while dated, seem to be some of the best available. Note that these can be read with a 7-day trial. Do this! At least get through the introduction section and first chapter of each to see if it's what you're after.

https://www.netfilter.org/

@rotemreiss
rotemreiss / setup-ubuntu-devenv.sh
Last active May 18, 2024 21:32
Shell script to setup all the basic development tools on fresh Ubuntu 18.04.
#!/bin/sh
# @todo Automate the manual steps at the bottom
# Make it work (broken on Ubuntu 18.04)
#if [[ $EUID -ne 0 ]];
#then
# exec sudo /bin/bash "$0" "$@"
#fi
echo "Update Linux"
@simonista
simonista / .vimrc
Last active May 18, 2024 21:31
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on