Skip to content

Instantly share code, notes, and snippets.

@gigablah
gigablah / ansible-container.yml
Created November 11, 2015 08:17
Update Docker containers with Ansible
---
- name: Spin up a container
hosts: localhost
connection: local
gather_facts: False
sudo: False
vars:
base_image: gigablah/alpine-python
container_name: ansible_test
tasks:
@n8henrie
n8henrie / dbox_sync.py
Last active November 14, 2021 14:44
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
"""dbox_sync.py
One-way sync of local directory to Dropbox using Dropbox API V2 and python3.
Dependencies:
- dropbox (`pip3 install dropbox`)
Minimal modifications from:
https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py
@mattiaslundberg
mattiaslundberg / Ansible Let's Encrypt Nginx setup
Last active May 31, 2024 00:34
Let's Encrypt Nginx setup with Ansible
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
@wall72
wall72 / install_TensorFlow_on_Windows_10_Bash.md
Last active December 31, 2021 20:12
install TensorFlow on Windows 10 Bash (include graphiclib)

install TensorFlow on Windows 10 Bash (include graphiclib)

1. install packages

sudo apt-get update
sudo apt-get install -y --no-install-recommends \
        build-essential \
        libfreetype6-dev \
        libpng12-dev \
        libzmq3-dev \
@NorikDavtian
NorikDavtian / .bash_aliases
Created May 31, 2017 00:51
Docker cleanup bash aliases
# ~/.bash_aliases
# https://www.calazan.com/docker-cleanup-commands/
# Kill all running containers.
alias dockerkillall='docker kill $(docker ps -q)'
# Delete all stopped containers.
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
# Delete all untagged images.
@vireshas
vireshas / split_wav.py
Created November 16, 2017 12:16 — forked from rudolfbyker/split_wav.py
Split WAV files at silence
#!/usr/bin/env python
from scipy.io import wavfile
import os
import numpy as np
import argparse
from tqdm import tqdm
# Utility functions
@mxactvtd
mxactvtd / TidalCyclesQuickReferenceStub.tidal
Last active March 8, 2024 21:19
TidalCycles Quick Reference compiled and partially rewritten documentation from various sources
---- TidalCycles QUICK REFERENCE ----
----------------------------------------------------------------
-- To use in your editor after or alongside your code for quick reference
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions
-- designed with atom - monokai one dark vivid as theme
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm
----------------------------------------------------------------
-- Some sources of Documentation --
-- https://tidalcycles.org/patterns.html
-- https://tidalcycles.org/functions.html
@htr3n
htr3n / macos-ramdisk.md
Last active May 31, 2024 13:59
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@lcarsos
lcarsos / restore_functionality.sh
Last active May 7, 2024 11:53
Repeatedly kill sentinelone so you can actually use the processor and ram on your mac
#!/usr/bin/env bash
# Usage: sudo ./restore_functionality.sh
#ps aux | grep sentinel | awk -F " +" '{print $2}' | xargs kill
while true; do
launchctl kill SIGKILL system/com.crowdstrike.falcond
launchctl kill SIGKILL system/com.crowdstrike.userdaemon
launchctl kill SIGKILL system/com.sentinelone.sentineld
launchctl kill SIGKILL system/com.sentinelone.sentineld-helper