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
def delete(**kwargs): | |
connection_id = kwargs.get('connection_id', '') | |
service = Service.get(name = connection_id) | |
delete_status = service.delete() | |
return delete_status |
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
def create(**kwargs): | |
SLACK_CHANNEL = kwargs.get('SLACK_CHANNEL', '') | |
SLACK_ACCESS_TOKEN = kwargs.get('SLACK_ACCESS_TOKEN', '') | |
SSH_HOSTNAME = kwargs.get('SSH_HOSTNAME', '') | |
SSH_PORT = kwargs.get('SSH_PORT', '') | |
SSH_USERNAME = kwargs.get('SSH_USERNAME', '') | |
SSH_PASSWORD = kwargs.get('SSH_PASSWORD', '') | |
SSH_KEY = kwargs.get('SSH_KEY', '') |
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
On a terminal: | |
mplayer -ao null <video file name> -vo jpeg:outdir=output | |
Use ImageMagick to convert the screenshots into an animated gifs. | |
convert output/* output.gif | |
you can optimize the screenshots this way: | |
convert output.gif -fuzz 10% -layers Optimize optimised.gif |
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
apksystems@apps:/var/www/html/var/log$ cat apk_fail_tambovtd-451.log | |
Picked up _JAVA_OPTIONS: -Xmx384m -Xms384m -XX:MaxPermSize=384m | |
FAILURE: Build failed with an exception. | |
* Where: | |
Build file '/var/www/html/var/tmp/applications/ionic/android/tambovtd-451/build.gradle' line: 20 | |
* What went wrong: | |
A problem occurred evaluating root project 'tambovtd-451'. |
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
{ | |
"words":[ | |
{ | |
"origin":"harold", | |
"transcription":"məkˈmɪlən", | |
"examples":[ | |
], | |
"image":"http://www.bing.com/cr?IG=83682CAE6A664014888DB021626D8EBF&CID=3FE2F62302F7657E379EFF960310643F&rd=1&h=vFnZ40phtjVp_IZhxTGuRaXv4fcPbOov3cOLmdgHdZw&v=1&r=http%3a%2f%2fnerdalors.fr%2fwp-content%2fuploads%2f2009%2f05%2fharold.jpg&p=DevEx,5008.1" | |
}, |
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
url = u'https://api.cognitive.microsoft.com/bing/v5.0/images/search?count=10&q={}'.format(inline_query) | |
r = requests.post(url, headers=HEADERS) | |
j = r.json() | |
images = j['value'] | |
for im in images: | |
results.append(InlineQueryResultPhoto( | |
id=uuid4(), |
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
{ | |
"name": "manager", | |
"services": [ | |
{ | |
"name": "lb", | |
"image": "dokkur/haproxy", | |
"target_num_containers": 1, | |
"autorestart": "ALWAYS", | |
"linked_to_service": [ | |
{ |
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
# | |
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. | |
# To really apply changes, reload proftpd after modifications, if | |
# it runs in daemon mode. It is not required in inetd/xinetd mode. | |
# | |
# Includes DSO modules | |
Include /etc/proftpd/modules.conf | |
# Set off to disable IPv6 support which is annoying on IPv4 only boxes. |
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
object(Zend_Db_Statement_Exception)#82 (8) { | |
["_previous":"Zend_Exception":private] => NULL | |
["message":protected] => string(99) "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pEaChepg.push_gcm_devices' doesn't exist" | |
["string":"Exception":private] => string(0) "" | |
["code":protected] => int(42) | |
["file":protected] => string(38) "/app/www/lib/Zend/Db/Statement/Pdo.php" | |
["line":protected] => int(234) | |
["trace":"Exception":private] => array(14) { | |
[0] => array(6) { | |
["file"] => string(34) "/app/www/lib/Zend/Db/Statement.php" |
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 | |
DEVICE_NAME=$(lsblk -nldo NAME | sort -r | head -1) | |
USAGE_COUNT=$(sudo pvdisplay -c | grep -c /${DEVICE_NAME}) | |
MOUNT_POINT=$1 | |
if [ -z $MOUNT_POINT ]; then | |
echo "NO MOUNT POINT SPECIFIED" | |
exit 1 | |
fi |