This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Install kraken cli (https://support.kraken.com/hc/en-us/articles/360025180232-Kraken-REST-API-command-line-client) and put this script in same path | |
# Make sure the following tools are installed: bc, jq | |
# To make a daily trade add this script in your cron | |
# Use offical pair, check them with ./krakenapi.py AssetPairs | jq | |
PAIR=XXBTZEUR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script to buy crypto through https://www.bitvavo.com at market price, so you can automate for DCA (Dollar Cost Averaging) | |
# Request API KEY and API Secret in your bivavo account with trade permissions | |
# Pass in api key and secret as environment variables to the script | |
# Argument 1 is for quote amount (default: 10) | |
# Argument 2 is for market (default: BTC-EUR) | |
# Examples: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Pagination template override | |
* Functions to override joomla standard behaviour | |
*/ | |
/** | |
* From JPagination::_list_render | |
* | |
* @param $list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First stage: strip all comments, this will ALWAYS reduce size | |
jpegoptim --max=85 --strip-all --strip-com --strip-exif --strip-iptc --strip-icc $1 | |
# Second stage: do an progressive scan apart which may produce bigger images in some scenarios | |
jpegoptim --all-progressive $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i in.mp4 -ss 00:10:00 -to 00:20:00 -c copy out.m4v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Proof of concept to use CommonMarker to only render a subset of CommanMark language | |
# Good if you only want links, em, strong, etc where minimal markup is desired. | |
# Example: HtmlMiniRenderer.new.render(CommonMarker.render_doc("# Test")) | |
class HtmlMiniRenderer < CommonMarker::HtmlRenderer | |
[ | |
:header, | |
:list, | |
:list_item, | |
:blockquote, | |
:hrule, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wget https://raw.githubusercontent.com/jiahaog/nativefier-icons/master/assets/whatsapp/whatsapp.png | |
nativefier --name "WhatsApp" --width 700px --height 800px -o --counter --icon whatsapp.png 'https://web.whatsapp.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
itunes_folder="/Users/MacBookPro/Music/iTunes/iTunes Media/Music" | |
output_folder="/Users/MacBookPro/MP3s" | |
if [ ! -d "$output_folder" ]; then | |
mkdir -p "$output_folder" | |
fi | |
find "$itunes_folder" -type f | while read FILENAME; | |
do | |
file=$(basename "$FILENAME") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
orm_repository.your_entity: | |
class: Doctrine\ORM\EntityRepository | |
factory_service: doctrine.orm.default_entity_manager | |
factory_method: getRepository | |
arguments: | |
- Acme\Entity\YourEntity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -E -H -k -K -p -e robots=off http://example.com |