Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
| FROM ubuntu | |
| RUN apt update \ | |
| && apt install -y firefox \ | |
| openssh-server \ | |
| xauth \ | |
| && mkdir /var/run/sshd \ | |
| && mkdir /root/.ssh \ | |
| && chmod 700 /root/.ssh \ | |
| && ssh-keygen -A \ | |
| && sed -i "s/^.*PasswordAuthentication.*$/PasswordAuthentication no/" /etc/ssh/sshd_config \ |
| # checkout, compile & install | |
| git clone https://github.com/facebook/watchman.git | |
| cd watchman/ | |
| git checkout v4.9.0 | |
| sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool | |
| ./autogen.sh | |
| ./configure | |
| make | |
| sudo make install |
| var gulp = require('gulp'); | |
| var exec = require('child_process').exec; | |
| var cmakeCommand = "mkdir -p build; cd build; cmake ..;"; | |
| var cleanCommand = "rm -rf build"; | |
| var testCommand = "cd build; ctest -V"; | |
| //"cmake --build ." |
| // C/C++ tips for using printf-style functions | |
| // Lots of manipulation can be expressed simply and fast with printf-style formatting | |
| // Also helps reducing the number of temporaries, memory allocations or copies | |
| // ( If you are looking for a simple C++ string class that is printf-friendly and not heap-abusive, | |
| // I've been using this one: https://github.com/ocornut/Str ) | |
| // If you are interested in a FASTER implementation of sprintf functions, see stb_sprintf.h | |
| // https://github.com/nothings/stb/blob/master/stb_sprintf.h | |
| // How to concatenate non-zero terminated strings |
| //Compile: gcc xgrabkey.c `pkg-config --cflags --libs x11` | |
| #include <stdio.h> | |
| #include <X11/Xlib.h> | |
| int | |
| main () | |
| { | |
| Window root; | |
| Display *dpy = NULL; |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| #!/bin/sh | |
| # | |
| # Automatically adds branch name and branch description to every commit message. | |
| # | |
| NAME=$(git branch | grep '*' | sed 's/* //') | |
| DESCRIPTION=$(git config branch."$NAME".description) | |
| TEXT=$(cat "$1" | sed '/^#.*/d') | |
| if [ -n "$TEXT" ] | |
| then |
| I have to be frank here, this is going to be | |
| - criticism of thrust | |
| - Showing off ArrayFire (of which I am a core developer) | |
| *Criticism of thrust* | |
| They do a good job at optimizing parallel algorithms for vector inputs. | |
| They use data level parallelism (among other things) to parllelize algorithms that work really well for large, vector inputs. | |
| But they fail to improve upon it and go all the way to perfom true data level parallelism. i.e. a large number of small problems. |
| #!/bin/bash | |
| # This way you can customize which branches should be skipped when | |
| # prepending commit message. | |
| if [ -z "$BRANCHES_TO_SKIP" ]; then | |
| BRANCHES_TO_SKIP=(master develop test) | |
| fi | |
| BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
| BRANCH_NAME="${BRANCH_NAME##*/}" |