Skip to content

Instantly share code, notes, and snippets.

@MafiaInc
MafiaInc / foreground_background.sh
Last active June 3, 2018 20:30
Small snippets to remember that I use from time to time.
[[ "$(ps -o stat= -p $PPID)" = "Ss" ]] && echo "Executed in foreground" || echo "Executed in background"
# credit : https://stackoverflow.com/questions/4261876/check-if-bash-script-was-invoked-from-a-shell-or-another-script-application
@MafiaInc
MafiaInc / tarsnap-install.sh
Created December 24, 2015 21:51 — forked from mdigital/tarsnap-install.sh
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
@MafiaInc
MafiaInc / leibniz_pi_with_threads.c
Created January 31, 2017 11:18
Calculate Pi with Leibniz formula using pthread library (as part of C course)
#include<stdio.h>
#include<pthread.h>
#include<math.h>
#include<stdlib.h>
#include<unistd.h>
#define NUM_THREADS 8
typedef struct {
int rank;
$ yaourt -S uqm-hd
==> Downloading uqm-hd PKGBUILD from AUR...
x .SRCINFO
x PKGBUILD
x config.state
x uqm-hd
x uqm-hd.desktop
x uqm-hd.png
asynec commented on 2017-09-18 21:21
From d3fc6ddaea8b5ee5285b4745fafbf84588338203 Mon Sep 17 00:00:00 2001
From: Martin Dimitrov <[email protected]>
Date: Tue, 28 Nov 2017 15:21:59 +0200
Subject: [PATCH] Fix possible naming collision for _STRINGS_H
* Fix build errors on gcc (GCC) 7.2.0
---
src/uqm/comm/arilou/strings.h | 6 +++---
src/uqm/comm/blackur/strings.h | 6 +++---
src/uqm/comm/chmmr/strings.h | 6 +++---
@MafiaInc
MafiaInc / keybase.md
Created September 11, 2019 08:47
keybase

Keybase proof

I hereby claim:

  • I am mafiainc on github.
  • I am chuchelo (https://keybase.io/chuchelo) on keybase.
  • I have a public key ASAE0C0Jj6EtAWfvVZLk3XY0D5cm5BBx-OunRqHCRMc8lwo

To claim this, I am signing this object:

@MafiaInc
MafiaInc / android-backup-apk-and-datas.md
Created October 25, 2020 10:40 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications: