Skip to content

Instantly share code, notes, and snippets.

Running a Docker on Google Cloud Run with Celery + Flask + Redis

Tricks

  1. Set everything up normally and get things working in testing.
  2. Have the docker run something like
CMD ["./server.sh"]

at the end

Linking against jsoncpp using CMake

This one sucked

  1. Build jsoncpp
git clone https://github.com/open-source-parsers/jsoncpp.git; (cd jsoncpp && mkdir build)
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON -G "Unix Makefiles" ../; make; make install

NNG + CMake

  1. Build and install NNG
git clone https://github.com/nanomsg/nng.git; (cd nng && mkdir build)
cd build
CFLAGS=-fPIC cmake -G Ninja ../; ninja; ninja install
  1. In your CMakeLists.txt in the project that you would like to link against NNG do:
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h \[\033[33;1m\]\w\[\033[m\]\$(parse_git_branch) $ "

Keybase proof

I hereby claim:

  • I am lucbettaieb on github.
  • I am lucbettaieb (https://keybase.io/lucbettaieb) on keybase.
  • I have a public key ASBuv7t5ctmcBvHevpBFCNKdycqjMUBipZKPz1-Z0gztcwo

To claim this, I am signing this object:

@lucbettaieb
lucbettaieb / Aircrack Commands
Created January 16, 2017 20:27 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
@lucbettaieb
lucbettaieb / opencv_tensor.cc
Created December 5, 2016 21:18 — forked from kyrs/opencv_tensor.cc
File Takes an Image Mat file as an input and convert it to tensor.
/*
Following file take opencv mat file as an input and run inception model on it
Created by : Kumar Shubham
Date : 27-03-2016
*/
//Loading Opencv fIles for processing
#include <opencv2/opencv.hpp>
  • From GRUB, go to other options
  • Boot into recovery mode
  • Get networking
  • Fix packages
  • go to root terminal
  • sudo mount -o remount,rw /
  • sudo apt-get purge nvidia*
  • dont install nvidia-current again
  • /should/ work!
cmake_minimum_required(VERSION 2.8.3)
# Here is what your project (package) is called. Should be the same as your package.xml package name.
project(<PACKAGE NAME>)
## This is where you put all of the dependencies for the package.
## When using catkin_create_pkg, this is one of the places where
## the dependencies are auto-placed. If you need to add more later
## on, you need to put them in manually.