Skip to content

Instantly share code, notes, and snippets.

View sadjad's full-sized avatar

Sadjad Fouladi sadjad

View GitHub Profile
#include <array>
#include <iostream>
using namespace std;
template<unsigned int n0, unsigned int... rest>
struct last_element
{
constexpr static unsigned int value = last_element<rest...>::value;
};
@sadjad
sadjad / parse_runlogs.py
Created August 11, 2020 21:55
Turn gg timing logs to csv
#!/usr/bin/env python3
import os
import sys
datadir = sys.argv[1]
data_points = []
headers = []
@sadjad
sadjad / cloudSettings
Last active March 11, 2021 23:47
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-10-14T01:40:45.857Z","extensionVersion":"v3.4.3"}

Salam Agha Mori

This is a bold text.

set -g default-terminal "screen-256color"
# Use Alt-arrow keys without prefix key to switch panes
bind -n S-Left select-pane -L
bind -n S-Right select-pane -R
bind -n S-Up select-pane -U
bind -n S-Down select-pane -D
# Shift arrow to switch windows
bind -n C-Left previous-window
@sadjad
sadjad / report.txt
Created December 5, 2018 20:57
Moana scene render report
Statistics:
BVH
Interior nodes 151953565
Leaf nodes 151953887
Primitives per leaf node 204961515 / 151953887 (1.35x)
Integrator
Camera rays traced 449839104
Surface interactions 1377276072
Path length 2.054 avg [range 0 - 10]
Intersections
This file has been truncated, but you can view the full file.
gen/layout_test_data/mojo/public/js/mojo_bindings.js
gen/base/android/library_loader/anchor_functions_buildflags.h
gen/base/generated_build_date.h
gen/base/cfi_buildflags.h
gen/base/debug/debugging_buildflags.h
gen/base/partition_alloc_buildflags.h
gen/base/memory/protected_memory_buildflags.h
gen/base/synchronization/synchronization_buildflags.h
gen/base/allocator/buildflags.h
gen/library_loaders/libudev0.h
@sadjad
sadjad / run.sh
Last active September 12, 2018 21:03
#!/bin/bash
gg-init
gcc -o sleeper sleeper.c -static
gg-collect sleeper
for i in $(seq 1 1000)
do
gg-create-thunk --executable $(gg-hash sleeper) --output output --placeholder ${i}.out $(gg-hash sleeper) sleeper ${i}
done
@sadjad
sadjad / gcc.patch
Last active September 17, 2018 19:58
Building chromium-browser package with gg
diff a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -55,7 +55,7 @@
enable_mdns=true \
enable_nacl=false \
enable_wayland_server=false \
- enable_widevine=true \
+ enable_widevine=false \
fieldtrial_testing_like_official_build=true \
--- a/debian/rules
+++ b/debian/rules
@@ -55,7 +55,7 @@ common_defines+=\
enable_mdns=true \
enable_nacl=false \
enable_wayland_server=false \
- enable_widevine=true \
+ enable_widevine=false \
fieldtrial_testing_like_official_build=true \
is_component_build=false \