I hereby claim:
- I am fclairamb on github.
- I am fclairamb (https://keybase.io/fclairamb) on keybase.
- I have a public key ASA3MsMSqP-rEvGEE4ps2nlLlSwZ_j2_TNiGGbJPUw8pIAo
To claim this, I am signing this object:
#ifdef __SHELL__ | |
set -ex | |
if [ "$0" = "sh" ]; then | |
curl https://gist.githubusercontent.com/fclairamb/0387016387c5474e06476f0a84b6ad86/raw/round.cpp > round.cpp && \ | |
chmod a+rx round.cpp && \ | |
./round.cpp | |
exit $? | |
fi | |
BIN=test-$(arch) |
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) | |
panic(cpu 0 caller 0xffffff8021ac2838): nvme: "Fatal error occurred. ID=0xffffffff ARG1=0xffffffff ARG2=0xffffffff ARG3=0xffffffff EDD0=0xffffffff EDD1=0xffffffff EDD2=0xffffffff EDD3=0xffffffff EDD4=0xffffffff EDD5=0xffffffff EDD6=0xffffffff EDD7=0xffffffff NANDV=0x2, DRAMV=0x2, SSDC=512GB. FW Revision=16.14.01\n"@/System/Volumes/Data/SWE/macOS/BuildRoots/2288acc43c/Library/Caches/com.apple.xbs/Sources/IONVMeFamily/IONVMeFamily-557.100.13/Common/IONVMeController.cpp:5499 | |
Backtrace (CPU 0), Frame : Return Address | |
0xffffffb0f5443960 : 0xffffff801f28e02d | |
0xffffffb0f54439b0 : 0xffffff801f3d48e3 | |
0xffffffb0f54439f0 : 0xffffff801f3c4eda | |
0xffffffb0f5443a40 : 0xffffff801f232a2f | |
0xffffffb0f5443a60 : 0xffffff801f28d84d | |
0xffffffb0f5443b80 : 0xffffff801f28db43 |
I hereby claim:
To claim this, I am signing this object:
package ginlogger | |
// Directly inspired from the default gin.Logger | |
// This is to be used like this: | |
// r := gin.New() | |
// r.Use(gin.Recovery()) | |
// r.Use(ginlogger.LoggerWithGoKit(mylogger)) | |
import ( |
#ifdef SHELL | |
g++ -Wall -Werror -g -I../../cclib/rapidjson/include $0 && ./a.out | |
exit 0 | |
#endif | |
// Output is: | |
// {"project":"rapidjson","stars":11} | |
// {"Name":"XYZ","Rollnumer":2,"array":["hello","world"],"Marks":{"Math":"50","Science":"70","English":"50","Social Science":"70"}} | |
// {"FromEmail":"[email protected]","FromName":"Sender's name","Subject":"My subject","Recipients":[{"Email":"[email protected]"}],"Text-part":"this is my text"} |
[ -f /usr/bin/svn ] || sudo apt-get install subversion -y | |
[ -f /usr/bin/mail ] || sudo apt-get install mailutils -y | |
[ -f /usr/bin/pip ] || sudo apt-get install python-pip -y | |
sudo pip install pygments >/dev/null | |
SVN_NEW=$SVN_REVISION_1 | |
SVN_OLD=$(cat svn_old ||:) | |
echo $SVN_NEW >svn_old | |
svn log $SVN_URL -r $(expr $SVN_OLD + 1 ):$SVN_NEW >logs.txt | |
svn diff $SVN_URL -r $SVN_OLD:$SVN_NEW >diff.txt | |
cat diff.txt | pygmentize -l diff -f html -O noclasses,nobackground -o diff.html |
// stack_trace.c | |
// | |
// gcc stack_trace.c -ldw -lunwind -g -o stack_trace | |
#define UNW_LOCAL_ONLY | |
#include <elfutils/libdwfl.h> | |
#include <libunwind.h> | |
#include <stdio.h> |
#ifdef SHELL | |
gcc -ansi -g $0 && ./a.out | |
exit 0 | |
#endif | |
#include <stdio.h> | |
#include <string.h> | |
void permutation (char * prefix, char * str) { | |
int n = strlen(str); |
#ifdef SHELL | |
gcc -std=c99 -Wall -Werror $0 && ./a.out | |
exit $? | |
#endif | |
#include <stdio.h> | |
/* | |
Output: |
#ifdef SHELL | |
gcc -Wall -Werror $0 && ./a.out | |
exit $? | |
#endif | |
/* | |
Output: | |
Table : 0x7fff03ab7490 | |
Row 0 : 0x7fff03ab7490 | |
Cell 0:0 : 0x7fff03ab7490 |