Skip to content

Instantly share code, notes, and snippets.

View adastreamer's full-sized avatar
🤺
What's happening?

Eugene Khashin adastreamer

🤺
What's happening?
View GitHub Profile
dokkur@ubuntu:~$ time sudo DOKKU_TAG=v0.5.5 bash bootstrap.sh
Preparing to install v0.5.5 from https://github.com/dokku/dokku.git...
--> Ensuring we have the proper dependencies
--> Initial apt-get update
(Reading database ... 57553 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.0.1ubuntu2.12_amd64.deb ...
Unpacking apt-transport-https (1.0.1ubuntu2.12) over (1.0.1ubuntu2.11) ...
Setting up apt-transport-https (1.0.1ubuntu2.12) ...
--> Installing docker
2016-04-18 03:55:45 URL:https://get.docker.com/ [14387/14387] -> "-" [1]
angular.module 'dokkurFrontend'
.controller 'AppSettingsController', (
$timeout
$q
$interval
$state
$scope
$rootScope
SEO
dkSubscriberService
var getHeight = function(){
var viewport = new Object();
viewport.height = 0;
// the more standards compliant browsers (mozilla/netscape/opera/IE7)
//use window.innerWidth and window.innerHeight
if (typeof window.innerHeight != 'undefined')
{
viewport.height = window.innerHeight
}
else if (typeof document.documentElement != 'undefined'
if ( jQuery.isWindow( elem ) ) {
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
var docElemProp = elem.document.documentElement[ "client" + name ],
body = elem.document.body;
return elem.document.compatMode === "CSS1Compat" && docElemProp ||
body && body[ "client" + name ] || docElemProp;
// Get document width or height
} else if ( elem.nodeType === 9 ) {
#!/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
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"
#
# /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.
{
"name": "manager",
"services": [
{
"name": "lb",
"image": "dokkur/haproxy",
"target_num_containers": 1,
"autorestart": "ALWAYS",
"linked_to_service": [
{
@adastreamer
adastreamer / gist:64a35e13803ca46a7acdf0cf1d62dd0c
Created October 4, 2016 21:12
Inline pictures telegram bot
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(),
{
"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"
},