Skip to content

Instantly share code, notes, and snippets.

@tompaton
tompaton / backup.py
Created September 10, 2011 14:31
Python backup script
#!/usr/bin/env python
"""
backup.py
Create an archive which will be suitable for rsyncing to a remote backup.
- will not copy data unnecessarily for common operations such as
renaming a file or reorganising the directory structure.
(assumes large files are generally going to be immutable, e.g. audio/video)
- doesn't try to do anything fancy with permissions etc.
@arioch
arioch / gist:f7dd700255c1bc21fe129fe0aec14420
Created November 28, 2016 13:32 — forked from carlspring/gist:6762356
TeamCity REST API Commands
@Johannestegner
Johannestegner / tc-backup.sh
Created March 25, 2017 08:28
Backup script for teamcity using basic auth via curl.
#!/usr/bin/env bash
# Change the following parameters to suit the backup you wish to create.
SERVER="https://XXXXXX" # URL to the server to back up.
WITH_TIMESTAMPS=false # If true, the file will be suffixed with current date-time.
INCLUDE_CONFIGS=true # To include configurations or not.
INCLUDE_DATABASE=true # To include database or not.
INCLUDE_BUILD_LOGS=true # To include build logs or not.
INCLUDE_PERSONAL_CHANGES=true # To include personal changes or not.
FILE_NAME_PREFIX="automatic-backup" # Name of the file (if timestamp is true, it will be suffixed with that).
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 9, 2024 15:59
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mateusalxd
mateusalxd / scraping_preco_google_script.gs
Last active September 6, 2019 14:31
Scraping com Google App Script - Preço de Produto
/*
O Script abaixo abre uma Planilha do Google e inseri algumas informações referentes ao produto específico.
Link da planilha de modelo:
https://docs.google.com/spreadsheets/d/1JqHSrSatD_QoEaAUjeaIYL7Aiz3mZ5_FEhDVZ4xFGho/edit?usp=sharing
Observação: o id da planilha de modelo é 1JqHSrSatD_QoEaAUjeaIYL7Aiz3mZ5_FEhDVZ4xFGho,
porém não pode ser utilizado pois está como somente leitura.
Limites:

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@jkalucki
jkalucki / timelapsevideo.md
Last active March 10, 2024 22:52
Creating Timelapse Video From Photos With FFMPEG

Creating Timelapse Video From Photos With FFMPEG

Man, there are a lot of outdated and incomplete tutorials about creating timelapse videos from JPG images and photos. Here's a quick start guide to get going in late 2019.

Software

I'm using ffmpeg version 4.2.1 on MacOS. It is free, well supported, and scales up to practically any number of input images or output video length.

There are a dozen paid timelapse software offerings out there, but I suspect they are just polished front-ends to ffmpeg. Small timelapse videos are possible in iMovie 10.1, but adding even a modest number of images bogs it down badly. The easiest approach is to create a rough lightly compressed video with ffmpeg and then edit the result in iMovie.

Resources

@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
App.css
html, body, #root {
font: 0.9rem sans-serif;
background: #0a1f44;
color: #1e2432;
height: 100%;
margin: 0;
}
.main-container {