This file contains hidden or 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
import os | |
def split(filehandler, delimiter=',', row_limit=10000, | |
output_name_template='output_%s.csv', output_path='.', keep_headers=True): | |
""" | |
Splits a CSV file into multiple pieces. | |
A quick bastardization of the Python CSV library. | |
Arguments: |
This file contains hidden or 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 | |
# @author: Alexandre Plennevaux | |
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP | |
# | |
# FTP LOGIN | |
HOST='sftp://ftp.domain.com' | |
USER='ftpusername' | |
PASSWORD='ftppassword' | |
# DISTANT DIRECTORY |
- Add to EC2 CodeCommitReadOnly Role
- sudo yum install -y awscli
- sudo rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-1-13.rhel6.noarch.rpm
- sudo yum install -y libcurl
- git config --global credential.helper '!aws codecommit credential-helper $@'
This file contains hidden or 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
### KERNEL TUNING ### | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 | |
vm.dirty_ratio = 60 | |
vm.dirty_background_ratio = 2 |
This file contains hidden or 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
cd ~ | |
curl -O https://www.amazontrust.com/repository/AmazonRootCA1.pem;mv AmazonRootCA1.pem AmazonRootCA1.crt | |
curl -O https://www.amazontrust.com/repository/AmazonRootCA2.pem;mv AmazonRootCA2.pem AmazonRootCA2.crt | |
curl -O https://www.amazontrust.com/repository/AmazonRootCA3.pem;mv AmazonRootCA3.pem AmazonRootCA3.crt | |
curl -O https://www.amazontrust.com/repository/AmazonRootCA4.pem;mv AmazonRootCA4.pem AmazonRootCA4.crt | |
cd /usr/local/share/ca-certificates/ | |
sudo mv ~/AmazonRootCA*.crt . | |
sudo update-ca-certificates | |
ls |
This file contains hidden or 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
# Driver plugin installation | |
Minikube uses Docker Machine to manage the Kubernetes VM so it benefits from the | |
driver plugin architecture that Docker Machine uses to provide a consistent way to | |
manage various VM providers. Minikube embeds VirtualBox and VMware Fusion drivers | |
so there are no additional steps to use them. However, other drivers require an | |
extra binary to be present in the host PATH. | |
The following drivers currently require driver plugin binaries to be present in | |
the host PATH: |
This file contains hidden or 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
Keith gave me the hook-up on turning NASA images into a high-quality movie. I had tried twiddling knobs starting from a basic ffmpeg incant: | |
ffmpeg -r 10 -i frame%03d.jpg frames.mov | |
but the movies looked terrible. | |
Keith said: | |
""" | |
Generally if you're making a movie out of separate frames, I prefer to use png2yuv and mpeg2enc from the mjpegtools package instead of ffmpeg -- it's pretty clean code designed for this task instead of an assemblage of random libraries. |
This file contains hidden or 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
;;;;;;;;;;;;;;;;;;;;; | |
; FPM Configuration ; | |
;;;;;;;;;;;;;;;;;;;;; | |
; All relative paths in this configuration file are relative to PHP's install | |
; prefix (/usr). This prefix can be dynamically changed by using the | |
; '-p' argument from the command line. | |
; Include one or more files. If glob(3) exists, it is used to include a bunch of | |
; files from a glob(3) pattern. This directive can be used everywhere in the |
NewerOlder