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
(setq | |
vfex--view-regex-old "^lib/\\(.+\\)/views/\\(.+\\)_view.ex" | |
vfex--template-regex-old "^lib/\\(.+\\)/templates/\\(.+\\)/" | |
vfex--view-regex-new "^lib/\\(.+\\)/controllers/\\(.+\\)_html.ex" | |
vfex--template-regex-new "^lib/\\(.+\\)/controllers/\\(.+\\)_html/" | |
vfex--controller-regex "^lib/\\(.+\\)/controllers/\\(.+\\)_controller.ex" | |
vfex--liveview-regex "^lib/\\(.+\\)/live/\\(.+\\)_live.ex" | |
vfex--liveview-template-regex "^lib/\\(.+\\)/live/\\(.+\\)_live.html.heex") | |
(defun vfex--dot-p (name) |
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
function FindProxyForURL(url, host) { | |
if (host.endsWith('.ir')) { | |
return 'DIRECT'; | |
} | |
return 'SOCKS5 127.0.0.1:10002;SOCKS 127.0.0.1:10002'; | |
} |
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/bash | |
# Install required applications | |
# Ubuntu: | |
# apt-get install inkscape pstoedit | |
# Arch: | |
# pacman -S inkscape pstoedit | |
function svgToEps() | |
{ |
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/bash | |
set -e | |
SERVER=someserver | |
DEPLOY_PATH=/some/path | |
START_SCRIPT=${DEPLOY_PATH}/bin/deploy_name | |
RELEASE_NAME=master | |
RELEASE_TAR=deploy_name-${RELEASE_NAME}.tar.gz | |
export MIX_ENV=prod |
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 bash | |
## This is a simple bash script to help deploy git-based projects to shared hostings. | |
## It work by tracking last deployed commit in a file (see below for file name). | |
## When you run this script, all files changed since last deployed commit up to now | |
## are put into a .tar.gz file (see below for file name), so you can easily upload and | |
## unzip it on shared hosting. | |
LAST_COMMIT_FILE=.last.deploy | |
OUTPUT_FILE=file.tar.gz |
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 bash | |
# This script is used to simply copy some files using `rsync` | |
# and then running some commands on server. | |
# Command can be run synchronously, or in background. | |
# For example, your can restart your `supervisor` workers | |
# and PHP-FPM after copying new files. | |
# NOTE: This script does not require any kind of version control, e.g. `git` | |
# Server name. Define the connection parameters in `~/.ssh/config` so that a |
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
<?php | |
/** | |
* This Artisan command can run any file in the context of application. | |
* It can be useful to test some scripts in production/staging to see what's happening. | |
* You can also use `$this->*` functions in script. | |
* This reads scripts from `storage` folder, but nothing prevents you from changing it. | |
**/ | |
Artisan::command('run:script {script}', function ($script) { | |
$full_path = storage_path($script); | |
if (file_exists($full_path)) { |