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
| files: | |
| /etc/httpd/conf.d/proxy.conf: | |
| mode: 000777 | |
| owner: ec2-user | |
| group: ec2-user | |
| content: | | |
| LoadModule proxy_module modules/mod_proxy.so | |
| LoadModule proxy_module modules/mod_proxy_http.so |
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 | |
| add_filter('request', function( $request ) { | |
| $tax_qv = 'product_cat'; | |
| $cpt_name = 'product'; | |
| if(!empty( $request[$tax_qv])) { | |
| $slug = basename($request[$tax_qv]); | |
| // if this would generate a 404 | |
| if(!get_term_by('slug', $slug, $tax_qv)) { |
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
| on run {input, parameters} | |
| repeat with movieFile in input | |
| try | |
| if name extension of (info for movieFile) is "mp4" then | |
| tell application "iFlicks" | |
| import movieFile as QuickTime movie with deleting | |
| end tell | |
| else if name extension of (info for movieFile) is "mkv" then |
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
| http.createServer(function(req, res){ | |
| var path = './images/' + Math.ceil(Math.random()*4) | |
| var img = fs.readFileSync(path + '.jpg'); | |
| res.writeHead(200, {'Content-Type': 'image/jpg' }); | |
| res.end(img, 'binary'); | |
| }).listen(80, '127.0.0.1'); |
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
| RewriteEngine on | |
| RewriteBase / | |
| RewriteCond % {REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html | |
| RewriteRule ^/([^/]+)\.html$ /$1/ [R=301,L] |
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
| { | |
| "color_scheme": "Packages/User/Espresso Soda.tmTheme", | |
| "default_line_ending": "unix", | |
| "file_exclude_patterns": | |
| [ | |
| "*.pyc", | |
| "*.pyo", | |
| "*.exe", | |
| "*.dll", | |
| "*.obj", |
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
| [core] | |
| autocrlf = input | |
| [alias] | |
| d=diff --color | |
| lg=log --graph --oneline --no-merges --pretty=format:'%Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset %C(yellow)%d%Creset' --abbrev-commit | |
| lf=log --name-only --oneline --no-merges --pretty=format:'%Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset %C(yellow)%d%Creset' --abbrev-commit | |
| lb=!git l --branches | |
| cmp = !sh -c 'git log --left-right --oneline --no-merges --pretty=format:\"%m %Cred%h%Creset - %s %Cgreen(%an - %cr)%Creset %C(yellow)%d%Creset\" $0...' | |
| br="!sh -c 'git fetch origin;git checkout --no-track -b feature/${0/#feature\\//} origin/master'" | |
| mb2=merge --squash |
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
| /** | |
| * Shows just the (tool)tip. | |
| * | |
| * Example: | |
| * | |
| * var tooltip = new TooltipClass({ | |
| * selector: '.tipped' | |
| * }); | |
| * | |
| * To inject content into the tooltip, place a data-tooltip attribute that matches the selector. |
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
| var form = new formidable.IncomingForm(), | |
| files = []; | |
| form.uploadDir = config.tmpPath; | |
| form.maxFieldsSize = config.maxUploadSize; | |
| form | |
| .on('file', function(field, file) { | |
| files.push([field, file]); | |
| }) |
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
| var test = require('./title_var'); | |
| test.title = "kJSDBGKJSDBgkjdfg"; |