Skip to content

Instantly share code, notes, and snippets.

View Zhomart's full-sized avatar
🏠
Working from home

Zhomart Mukhamejanov Zhomart

🏠
Working from home
View GitHub Profile
@Zhomart
Zhomart / gist:6667287
Created September 23, 2013 07:04
http://33467.cirkl.me with authentication
$ ab -n 500 -c 50 -A mzhomart@gmail.com:<pwd> http://33467.cirkl.me/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 33467.cirkl.me (be patient)
...
Finished 500 requests
@Zhomart
Zhomart / gist:6667497
Created September 23, 2013 07:38
http://test.cirkl.me with authentication (Used memcached to store home page statistics)
ab -n 500 -c 50 -A mzhomart@gmail.com:<pwd> http://test.cirkl.me/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking test.cirkl.me (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
@Zhomart
Zhomart / gist:7787563
Created December 4, 2013 13:41
building error libtorrent-rasterbar 0.16.12 on Mac OS X 10.9
$ brew install -v libtorrent-rasterbar 2>&1
==> Downloading https://libtorrent.googlecode.com/files/libtorrent-rasterbar-0.16.12.tar.gz
Already downloaded: /Library/Caches/Homebrew/libtorrent-rasterbar-0.16.12.tar.gz
tar xf /Library/Caches/Homebrew/libtorrent-rasterbar-0.16.12.tar.gz
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libtorrent-rasterbar/0.16.12 --enable-python-binding
checking whether make supports nested variables... yes
Building libtorrent-rasterbar 0.16.12
Checking for a C/C++ compiler to use:
@Zhomart
Zhomart / gist:7787589
Created December 4, 2013 13:43
brew doctor
$ brew doctor
Warning: gettext files detected at a system prefix
These files can cause compilation and link failures, especially if they
are compiled with improper architectures. Consider removing these files:
/usr/local/include/libintl.h
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
@Zhomart
Zhomart / gist:7787600
Created December 4, 2013 13:44
brew --config
$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: aee75f1898c0628523e41fdd665abadc647209d7
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.9-x86_64
Xcode: 5.0.2
CLT: 5.0.1.0.1.1382131676
@Zhomart
Zhomart / gist:7804325
Created December 5, 2013 12:18
/Users/zhomart/Library/Logs/Homebrew/libtorrent-rasterbar/config.log
$ cat /Users/zhomart/Library/Logs/Homebrew/libtorrent-rasterbar/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libtorrent-rasterbar configure 0.16.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libtorrent-rasterbar/0.16.12 --enable-python-binding
## --------- ##
@Zhomart
Zhomart / tictactoe.cpp
Created March 6, 2014 23:04
assignment 2
#include <iostream>
#include <cstdio>
#include <fstream>
using namespace std;
#define INVALID "i"
#define WIN_X "x"
#define WIN_O "o"
#define TIE "t"

From my computer:

$ ssh -t dokku@example.com run my-app ls
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ case "$1" in
++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/nginx-vhosts/commands
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/00_dokku-standard/commands run my-app ls
+ case "$1" in

In the server

user@the-pc:~/dokku$ sudo docker ps -a
CONTAINER ID        IMAGE                         COMMAND                CREATED              STATUS              PORTS                     NAMES
cc3bccf5b095        app/my-app:latest   /exec ls               About a minute ago   Exit 1                                        grave_curie
874c309f2f0e        app/my-app:latest   /exec ls               3 minutes ago        Exit 1                                        high_bardeen
6b02eae74800        app/my-app:latest   /exec ls               8 minutes ago        Exit 1                                        romantic_turing
e232456a74b5        app/my-app:latest   /exec ls               56 minutes ago       Exit 1                                        trusting_darwin1
39673439298c        app/my-app:latest   /exec ls -la           About an hour ago    Exit 1                                        goofy_bohr
/* Implement the three functions specified. When implemented properly,
the output of this program is
5 3 1 -4 2
4
0
-1
3 1 2 -2 -1 0
-2 -1
3 5 1 2 -2 -1 7 8 0 9
*/