cat images.txt | awk 'match($2, /images\/(.*)$/, a){print $2 "\t" a[1]}' | while read url store_path; do
curl ${url} --create-dirs -o ${store_path}
done;
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
sudo rm -rf /var/lib/docker/network |
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
# -*- coding: utf8 -*- | |
import json | |
import requests | |
import codecs | |
import locale | |
import sys | |
# Wrap sys.stdout into a StreamWriter to allow writing unicode. | |
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout) |
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
from fabric.api import lcd, local, path | |
project_dir = '/www/my_project/sms/' | |
env_bin_dir = project_dir + '../env/bin/' | |
def deploy(): | |
with lcd(project_dir): | |
local('git pull origin') | |
local('git checkout -f') | |
with path(env_bin_dir, behavior='prepend'): |
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
[diff] | |
tool = pycharm | |
[difftool "pycharm"] | |
cmd = /usr/local/bin/charm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read | |
[merge] | |
tool = pycharm | |
keepBackup = false | |
[mergetool "pycharm"] | |
cmd = /usr/local/bin/charm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED" |
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
// This is special version for fix conflict with videogular-youtube-plugin | |
(function (){ | |
'use strict'; | |
/** | |
* @ngdoc overview | |
* @name angularVideoBg | |
* @description This module contains a directive that allows you easily make a YouTube video play as the background of | |
* any container on your site. | |
*/ |
- Install
docker
anddocker-compose
- Download file
https://github.com/NamPNQ/koel/blob/feature-docker/docker-compose.yml
andhttps://github.com/NamPNQ/koel/blob/feature-docker/.env.example
- Rename
.env.example
to.env
- Edit
.env
APP_KEY: 16efa6c23c2e8c705826b0e66778fbe7 DB_HOST=db DB_DATABASE=koel DB_USERNAME=root
DB_PASSWORD=secret
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
# Store in /etc/nginx/conf.d/symfony_project.conf | |
server { | |
server_name symfony_project.localhost; | |
root /home/Workspace/symfony_project/web; | |
location / { | |
# try to serve file directly, fallback to app.php | |
try_files $uri /app_dev.php$is_args$args; | |
} | |
# DEV |
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
#!/usr/bin/env python | |
import re | |
import fileinput | |
def this_line_is_useless(line): | |
useless_es = [ | |
'BEGIN TRANSACTION', | |
'COMMIT', | |
'sqlite_sequence', |
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
# store in ~/.config/flake8 | |
[flake8] | |
ignore = F999,E501,E128,E124,E126,F841,E123,F401,F403 | |
max-line-length = 120 | |
exclude = env, .git |