Skip to content

Instantly share code, notes, and snippets.

@LebedevRI
LebedevRI / auto-deploy.md
Created April 19, 2017 18:06 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

gchar *_string_get_next_variable(gchar *string, gchar *variable, const size_t variable_size)
{
gchar *end = NULL;
gchar *start = g_strstr_len(string, -1, "$(");
if(start)
{
end = g_strstr_len(start, -1, ")");
if(end)
{
*end = '\0';
#include <memory>
#include <iostream>
int main(int argc, const char* argv[])
{
std::unique_ptr<float> buf(new float);
std::cin >> (*(buf.get()));
std::cout << buf.get() << std::endl;
std::cout << (*(buf.get())) << std::endl;
return 0;
}
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -load -Xclang /home/lebedevri/src/tartan/clang-plugin/.libs/libtartan.so -Xclang -add-plugin -Xclang tartan -Xclang -analyzer-checker -Xclang tartan -Xclang -analyze")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -load -Xclang /home/lebedevri/src/tartan/clang-plugin/.libs/libtartan.so -Xclang -add-plugin -Xclang tartan -Xclang -analyzer-checker -Xclang tartan -Xclang -analyze")
this is darktable 2.1.0+1128~g7e2c60f reporting a segfault:
#0 0x00007f7bb45ec99b in __waitpid (pid=6300, stat_loc=0x0, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1 0x00007f7bb91c5933 in waitpid () at /usr/lib/x86_64-linux-gnu/libasan.so.3
#2 0x00007f7bb8b6ebd0 in _dt_sigsegv_handler (param=11) at /home/lebedevri/darktable/src/common/darktable.c:193
#3 0x00007f7bb0a974e0 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007f7bb81ff4e6 in gtk_css_gadget_allocate (gadget=<optimized out>) at /build/gtk+3.0-UYMeaD/gtk+3.0-3.20.6/./gtk/gtkcssgadget.c:357
#5 0x00007f7bb81ff4e6 in gtk_css_gadget_allocate (gadget=0x0, allocation=allocation@entry=0x7ffe05ffa2f0, baseline=-1, out_clip=out_clip@entry=0x7ffe05ffa240) at /build/gtk+3.0-UYMeaD/gtk+3.0-3.20.6/./gtk/gtkcssgadget.c:731
#6 0x00007f7bb81adbb2 in gtk_box_size_allocate (widget=0x6250002383c0 [GtkBox], allocation=0x7ffe05ffa2f0) at /build/gtk+3.0-UYMeaD/gtk+3.0-3.20.6/./gtk/gtkbox.c:1219
#7 0x00007f7bb84030a3 in gtk_widge
Start-Date: 2016-03-16 11:50:37
Install: libzmq5:amd64 (4.1.4-6, automatic)
Upgrade: libreoffice-style-breeze:amd64 (5.0.5~rc2-1, 5.1.1-1), libreoffice-math:amd64 (5.0.5~rc2-1, 5.1.1-1), libreoffice-report-builder-bin:amd64 (5.0.5~rc2-1, 5.1.1-1), libavdevice-ffmpeg56:amd64 (2.8.6-1+b1, 2.8.6-1+b2), ffmpeg:amd64 (2.8.6-1+b1, 2.8.6-1+b2), libavutil-ffmpeg54:amd64 (2.8.6-1+b1, 2.8.6-1+b2), libstreams0v5:amd64 (0.7.8-2+b1, 0.7.8-2.1), libreoffice-java-common:amd64 (5.0.5~rc2-1, 5.1.1-1), libavfilter-ffmpeg5:amd64 (2.8.6-1+b1, 2.8.6-1+b2), libreoffice-base:amd64 (5.0.5~rc2-1, 5.1.1-1), update-glx:i386 (0.7.1, 0.7.2), libreoffice-core:amd64 (5.0.5~rc2-1, 5.1.1-1), libreoffice-style-oxygen:amd64 (5.0.5~rc2-1, 5.1.1-1), libswresample-ffmpeg1:amd64 (2.8.6-1+b1, 2.8.6-1+b2), libstreamanalyzer0v5:amd64 (0.7.8-2+b1, 0.7.8-2.1), libreoffice-kde:amd64 (5.0.5~rc2-1, 5.1.1-1), libreoffice-l10n-ru:amd64 (5.0.5~rc2-1, 5.1.1-1), python3-uno:amd64 (5.0.5~rc2-1, 5.1.1-1), rsyslog:amd64 (8.16.0-1, 8.16.0-1+b1), libreoffice-style
http://www.satsignal.eu/ntp/Raspberry-Pi-quickstart.html
http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html
https://bart.motd.be/node/79
http://ava.upuaut.net/?p=726
!!! https://gist.github.com/LebedevRI/20019255686c7cb1b578
sudo raspi-config
1. Expand Filesystem
2. Advanced Options -> Disable Serial Shell (optional)
@LebedevRI
LebedevRI / gpsControl.c
Created March 15, 2016 13:40
./gpsControl -s -d /dev/ttyAMA0 = Stationary Mode
#include <stdio.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
void usage( void )
{
export PREFIX=/opt/darktable
mkdir -p $PREFIX/share/aclocal
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig
export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules:$GIO_EXTRA_MODULES
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LFLAGS ASAN_OPTIONS
#define __DBL_MIN_EXP__ (-1021)
#define __HQ_FBIT__ 15
#define __UINT_LEAST16_MAX__ 65535
#define __ARM_SIZEOF_WCHAR_T 32
#define __ATOMIC_ACQUIRE 2
#define __SFRACT_IBIT__ 0
#define __FLT_MIN__ 1.1754943508222875e-38F
#define __GCC_IEC_559_COMPLEX 2
#define __UFRACT_MAX__ 0XFFFFP-16UR
#define __UINT_LEAST8_TYPE__ unsigned char