Skip to content

Instantly share code, notes, and snippets.

View webysther's full-sized avatar
👨‍🔬
Can you solve the 3n + 1 problem?

Webysther Sperandio webysther

👨‍🔬
Can you solve the 3n + 1 problem?
View GitHub Profile
@codspire
codspire / getting-started-with-superset-airbnb-data-exploration-platform.md
Last active February 12, 2024 21:41
Getting Started With Superset: Airbnb’s data exploration platform

Getting Started With Superset: Airbnb’s data exploration platform

Update Python and PIP versions on EC2 (Amazon AMI)

At the time of writing, Python v3.5 and PIP v9.0.1 were available on AWS EC2.

sudo yum update -y
sudo yum install python35 -y
@alopresto
alopresto / gpg_git_signing.md
Last active January 18, 2024 22:42
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@siennathesane
siennathesane / gutenberg.py
Last active January 14, 2024 18:11
Download all ePub books from Project Gutenberg. Only dependency is `alive-progress`, can be packaged with PyInstaller.
#!/usr/bin/env python3
from argparse import ArgumentParser
from os import listdir, stat
from os.path import sep as pathsep
from glob import glob
from shutil import SameFileError, copy, get_terminal_size
from typing import Union
from sys import exit, stdout
from alive_progress import alive_bar
from concurrent.futures import ProcessPoolExecutor, as_completed
@semeltheone
semeltheone / knime Batch execute
Last active December 26, 2023 05:13
Knime Execute Workflows from the Commandline
knime.exe -consoleLog -noexit -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile="PathToYourWorkflow.zip" -destFile="OutputPathToYourWorkflow.zip"
@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu
@saurabhshri
saurabhshri / pip.md
Last active September 24, 2023 11:07
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.

Why?

Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

How?

@veselosky
veselosky / s3gzip.py
Last active May 8, 2023 21:42
How to store and retrieve gzip-compressed objects in AWS S3
# vim: set fileencoding=utf-8 :
#
# How to store and retrieve gzip-compressed objects in AWS S3
###########################################################################
#
# Copyright 2015 Vince Veselosky and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@g0t4
g0t4 / _README.md
Created November 30, 2016 03:46
Setting up a Docker Hub registry mirror on a Synology NAS

Instructions

  • Save the docker-compose.yml and config.yml in the same directory on one of your volumes on the NAS.
  • SSH in and use docker-compose up -d
  • Test the mirror with curl --head http://NAS-IP:55000
  • Start up docker daemons with the following option or put this in the daemon config file or copy into Docker for Mac/Windows settings. --registry-mirror=http://NAS-IP:55000
  • Pull an image and then check that it is cached in your mirror with curl http://NAS-IP:55000/v2/_catalog
    • or check that a large image isn't slow after the first pull :)

Notes

@bblanchon
bblanchon / settings.json
Created February 9, 2016 10:28
Sublime Text: Restore Quick Switch Project shortcut
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }
@kirpit
kirpit / bash.py
Last active March 17, 2023 06:29
Enables to run subprocess commands in a different thread with TIMEOUT option!
#! /usr/bin/env python
import threading
import subprocess
import traceback
import shlex
class Command(object):
"""
Enables to run subprocess commands in a different thread with TIMEOUT option.