-
Make sure
noauth = trueis uncommented at/etc/mongodb.conf(enabled by default, but just in case) -
Create admin user:
| --[[ | |
| -- multisource lib | |
| -- A multisource is a wrapper on top of a LÖVE source. It allows | |
| -- creating multiple sounds easily. It uses an internal pool of | |
| -- resources. | |
| -- * multisource:play() finds a stopped resource from the pool, | |
| -- or creates a new one, and plays and returns it. | |
| -- * multisouce:cleanup() liberates the memory of old unplayed sources. | |
| ]] |
| # undo last N commits | |
| git reset --hard HEAD~3 | |
| git push origin HEAD --force | |
| # push to several remotes | |
| git remote add all origin-host:path/proj.git | |
| git remote set-url --add all a-host:path/proj.git | |
| git remote set-url --add all b-host:path/proj.git |
| # Symfony2 uses app/console, while Symfony3 uses bin/console | |
| # Clear cache and update db data | |
| php app/console cache:clear | |
| php app/console doctrine:schema:update --force | |
| <?php | |
| $buffer = ""; | |
| while($f = fgets(STDIN)) | |
| { | |
| $buffer = $buffer . $f; | |
| } | |
| function valid_byte($str) | |
| { |
| #include <stdio.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| /** | |
| * http://c.learncodethehardway.org/book/ex20.html | |
| */ | |
| #define clean_errno() (errno == 0 ? "None" : strerror(errno)) |
| // http://roy-t.nl/index.php/2010/03/04/getting-the-left-forward-and-back-vectors-from-a-view-matrix-directly/ | |
| mat4 matrix; | |
| vec3 right ( matrix(0,0), matrix(1,0), matrix(2,1) ); | |
| vec3 up ( matrix(0,1), matrix(1,1), matrix(2,2) ); | |
| vec3 back ( matrix(0,2), matrix(1,2), matrix(2,2) ); |
| # LuaRocks for 5.1 | |
| ./configure --lua-version=5.1 --versioned-rocks-dir --lua-suffix=5.1 | |
| make build | |
| sudo make install | |
| # LuaRocks for 5.2 | |
| ./configure --lua-version=5.2 --versioned-rocks-dir --lua-suffix=5.2 | |
| make build | |
| sudo make install |
| def upload_to_rename(instance, filename): | |
| # handle instance and filename | |
| return "sample" | |
| def build_concat(basepath, f): | |
| def _ret(instance, filename): | |
| return basepath + f(instance, filename) | |
| return _ret | |
| import sys | |
| import re | |
| infile = open( sys.argv[1], 'r' ) | |
| ret = " return\n" | |
| for line in infile.readlines(): | |
| try: | |
| funcname = line.rstrip() |
Make sure noauth = true is uncommented at /etc/mongodb.conf (enabled by default, but just in case)
Create admin user: