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
'use strict' | |
class NoLogsGroup { | |
constructor (serverless, options) { | |
this.hooks = { | |
'before:package:finalize': function () { removeCloudwatchLogsDefinition(serverless) } | |
} | |
} | |
} |
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
cat some.json | sed 's/\\\"/"/g' | sed 's/\\n//g' | jq . |
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/python | |
# Copyright (c) 2017 Ansible Project | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
ANSIBLE_METADATA = {'status': ['preview'], | |
'supported_by': 'community', | |
'metadata_version': '1.1'} | |
DOCUMENTATION = ''' | |
--- |
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
$clean = preg_replace('/[\x00-\x08\x0E-\x1F\x7F\x0C]+/', '', $dirty); |
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 | |
function progress($download_size, $downloaded, $upload_size, $uploaded) | |
{ | |
if($upload_size > 0) { | |
echo "\033[5D"; | |
echo str_pad(round(100 * $uploaded / $upload_size), 3, ' ', STR_PAD_LEFT) . " %"; | |
} | |
} |