Skip to content

Instantly share code, notes, and snippets.

View nickdiego's full-sized avatar

Nick Yamane nickdiego

View GitHub Profile
@nickdiego
nickdiego / start-server.sh
Created January 17, 2017 21:19
Shell script to start node server (can be used as a cron job)
#!/bin/bash
USERHOME=${HOME:-/home/nick}
SERVER_ROOT="${USERHOME}/projects/drunk-waiter/src/server-prototype"
RUN_SERVER_IN_TMUX=1 # set here or export in ~/.bashrc
tmuxsession='server'
logfile="${SERVER_ROOT}/server.log"
commands=(
"source '${USERHOME}/.bashrc';"
@nickdiego
nickdiego / android.gdb
Created April 7, 2017 22:30
android.gdb
# remember to exec 'adb forward tcp:1234 tcp:1234'
# before to try to connect using this macro
define connect-to-android-dev
set sysroot /opt/labs/ex/android/out/target/product/wandboard/symbols/
set solib-search-path /opt/labs/ex/android/out/target/product/wandboard/symbols/system/lib
target remote localhost:1234
br main
end
@nickdiego
nickdiego / xev-minimized
Created August 16, 2017 18:24
`xev -root` for cases 1 (unminimized) and 2 (minimized) - https://github.com/awesomeWM/awesome/issues/1987
MotionNotify event, serial 18, synthetic NO, window 0x139,
root 0x139, subw 0x0, time 52480340, (1061,36), root:(1061,36),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 18, synthetic NO, window 0x139,
root 0x139, subw 0x0, time 52480407, (1061,36), root:(1061,36),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 18, synthetic NO, window 0x139,
@nickdiego
nickdiego / i3-config
Created August 23, 2018 21:20
My initial i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@nickdiego
nickdiego / sync-chromium-behind-proxy.md
Last active September 16, 2025 11:43
Clone chromium sources behind corporate proxy + https certificate

The problem

Got the following error after trying to clone/sync chromium sources behing a corporate proxy/certificate (or something similar):

(venv) (develenv) ➜ chromium git:(master) ✗ gclient sync
Syncing projects: 100% (98/98), done.                                                        
Running hooks:  18% (14/75) binutils      
________ running '/home/nickp/sandbox/chromium/venv/bin/python src/third_party/binutils/download.py' in '/home/nickp/sandbox/chromium'
NOTICE: You have PROXY values set in your environment, but gsutil in depot_tools does not (yet) obey them.
@nickdiego
nickdiego / 999-kernel-efi-copy.hook
Created December 17, 2018 06:33
efi-hooks-arch
# /etc/pacman.d/hooks/999-kernel-efi-copy.hook
[Trigger]
Type = File
Operation = Install
Operation = Upgrade
Target = boot/vmlinuz*
Target = usr/lib/initcpio/*
Target = boot/*-ucode.img
[Action]
@nickdiego
nickdiego / update_agl.sh
Created February 5, 2019 16:20
Bash script to help on building/fetching/updating chromium AGL builds running in a remote build machine.
#!/usr/bin/env bash
# vim: ts=2 sw=2 et filetype=sh
set -e
#FIXME: temp
#set -x
BUILD=${BUILD:-0} # Build the artifact(s) before fetching/installing?
FETCH=${FETCH:-1} # Fetch the artifact(s) from the build server?
@nickdiego
nickdiego / error.out
Last active March 28, 2019 01:35
m4 build issue (yocto rocko-based AGL on Arch Linux host)
| gcc -I. -I../../m4-1.4.18/lib -isystem/home/nick/projects/agl/ws2/flounder-rpi3/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -isystem/home/nick/projects/agl/ws2/flounder-rpi3/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -O2 -pipe -c -o printf-args.o ../../m4-1.4.18/lib/printf-args.c
| gcc -I. -I../../m4-1.4.18/lib -isystem/home/nick/projects/agl/ws2/flounder-rpi3/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -isystem/home/nick/projects/agl/ws2/flounder-rpi3/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -O2 -pipe -c -o printf-parse.o ../../m4-1.4.18/lib/printf-parse.c
| gcc -I. -I../../m4-1.4.18/lib -isystem/home/nick/projects/agl/ws2/flounder-rpi3/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr/include -isystem/home/nick/projects/agl/ws2/flounder-rpi3/build/tmp/work/x86_64-linux/m4-native/1.4.18-r0/recipe-sysroot-native/usr
@nickdiego
nickdiego / backtrace.txt
Created November 1, 2019 19:31
Chromium Ozone/X11 Crash - File dialog (with XInitThread())
Received signal 11 SEGV_MAPERR 000000000010
#0 0x7fdfc3c1bd99 base::debug::CollectStackTrace()
#1 0x7fdfc3b02cf3 base::debug::StackTrace::StackTrace()
#2 0x7fdfc3c1b851 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x7fdfb51db930 <unknown>
#4 0x7fdfb51d2dc4 __GI___pthread_mutex_lock
#5 0x7fdfb347080b XrmQGetResource
#6 0x7fdfb344c29c XGetDefault
#7 0x7fdfb2fddf01 <unknown>
#8 0x7fdfb2fe09b0 <unknown>
From 5fbc959e8da5291d01d6a0ba53d5acfec0420193 Mon Sep 17 00:00:00 2001
From: Nick Diego Yamane <nickdiego@igalia.com>
Date: Wed, 5 Feb 2020 02:09:02 -0400
Subject: [PATCH] weston: build: Drop cflags_c in favor of config+cflags
---
third_party/weston/BUILD.gn | 52 ++++++++++++-------------------------
1 file changed, 17 insertions(+), 35 deletions(-)
diff --git third_party/weston/BUILD.gn third_party/weston/BUILD.gn