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
select schema_name(tab.schema_id) as schema_name, | |
tab.name as table_name, | |
col.column_id, | |
col.name as column_name, | |
t.name as data_type, | |
col.max_length, | |
col.precision | |
from sys.tables as tab | |
inner join sys.columns as col | |
on tab.object_id = col.object_id |
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
echo "Open bash for docker containers" | |
echo "1.) projectA" | |
echo "2.) projectB" | |
echo -n "Enter the docker number and press [ENTER]: " | |
read choice | |
if [ "$choice" == "1" ]; then | |
choice='projectA' | |
elif [ "$choice" == "2" ]; then |
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 | |
## declare an array variable | |
branches=("develop" "master") | |
repositoryPath="/Users/michael.favila/project/trading-platform" | |
## now loop through the above array | |
for i in "${branches[@]}" | |
do | |
echo "$repositoryPath ${i}" |
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
Access your local vagrantbox from your remote or other machine within the network. | |
Get the host machine IP and add it in the /etc/hosts of your server/computer that will access the vagrantbox. | |
E.g 10.9.6.91 yourdomain.dev | |
First step is to create this file 'http' in /etc/pf.anchors and add the data below: | |
rdr-anchor "forwarding" | |
load anchor "forwarding" from "/etc/pf.anchors/http" | |
Next step is to create this file 'pf-http.conf' in /etc and add the data below: | |
rdr-anchor "forwarding" |
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 | |
# | |
# nginx - this script starts and stops the nginx daemin | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# pidfile: /usr/local/nginx/logs/nginx.pid |
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 | |
FILES=/Users/IT/dumps/LocalDB/* | |
for f in $FILES | |
do | |
echo "Processing $f file..." | |
# take action on each file. $f store current file name | |
mysql -uDBUSER -hDBHOST --pDBPASSWORD DBNAME < $f | |
done |
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 | |
/* From https://www.usps.com/send/official-abbreviations.htm */ | |
$us_state_abbrevs_names = array( | |
'AL'=>'ALABAMA', | |
'AK'=>'ALASKA', | |
'AS'=>'AMERICAN SAMOA', | |
'AZ'=>'ARIZONA', | |
'AR'=>'ARKANSAS', |
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
# MacPorts Installer addition on 2014-12-05_at_17:01:26: adding an appropriate PATH variable for use with MacPorts. | |
export PATH="/opt/local/bin:/opt/local/sbin:$PATH" | |
# Finished adapting your PATH environment variable for use with MacPorts. | |
alias mysql_start='sudo /opt/local/share/mysql55/support-files/mysql.server start' | |
alias mysql_stop='sudo /opt/local/share/mysql55/support-files/mysql.server stop' | |
export PATH=$PATH:/usr/local/mysql/bin | |
# nginx |
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
# apigility.com | |
Listen 127.0.0.1:9271 | |
NameVirtualHost 127.0.0.1:9271 | |
<VirtualHost 127.0.0.1:9271> | |
DocumentRoot "D:\EasyPHP\data\localweb\projects\apigility.com\www" | |
RewriteEngine off | |
<Location /> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] |
NewerOlder