Skip to content

Instantly share code, notes, and snippets.

View talayhan's full-sized avatar
💤
Sleeping

Samet Talayhan talayhan

💤
Sleeping
View GitHub Profile

PART 1

[STEP 2] Adding a dedicated hadoop system user

check groups

$ compgen -g
@talayhan
talayhan / gist:a3610a8a7bc5e72f1816d50890680229
Created May 15, 2016 16:58 — forked from rygorous/gist:e0f055bfb74e3d5f0af20690759de5a7
A bit of background on compilers exploiting signed overflow
Why do compilers even bother with exploiting undefinedness signed overflow? And what are those
mysterious cases where it helps?
A lot of people (myself included) are against transforms that aggressively exploit undefined behavior, but
I think it's useful to know what compiler writers are accomplishing by this.
TL;DR: C doesn't work very well if int!=register width, but (for backwards compat) int is 32-bit on all
major 64-bit targets, and this causes quite hairy problems for code generation and optimization in some
fairly common cases. The signed overflow UB exploitation is an attempt to work around this.
#!/usr/bin/env bash
# add repository for g++-5
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
# add repository for clang-3.7
sudo add-apt-repository -y "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main"
wget --quiet -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
@talayhan
talayhan / gist:d5ac446319e33febb31cff3f51bf32cd
Created January 4, 2018 14:58 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@talayhan
talayhan / richhickey.md
Created April 18, 2018 08:34 — forked from prakhar1989/richhickey.md
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@talayhan
talayhan / Netfilter-IPTables-Diagrams.md
Created November 1, 2018 16:30 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@talayhan
talayhan / SimpleHTTPServerWithUpload.py
Created December 1, 2018 08:59 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@talayhan
talayhan / git-import-repository.md
Created February 24, 2019 12:42 — forked from martinbuberl/git-import-repository.md
Import existing Git repository into another

Import existing Git repository into another

Folder structure before (2 separate repositories):

XXX
 |- .git
 |- (project files)
YYY
 |- .git
@talayhan
talayhan / install_balsamiq_on_linux.sh
Created February 17, 2020 10:16
How to install Balsamiq Mockups on Manjaro Linux
#!/bin/sh
# date: 02-17-2020
# =================
# System info
# =================
# $ cat /etc/issue : Manjaro Linux \r (\n) (\l)
# $ uname -a : Linux t490 5.4.18-1-MANJARO #1 SMP PREEMPT Thu Feb 6 11:41:30 UTC 2020 x86_64 GNU/Linux
#install wine - my current version: wine-5.0
sudo pacman -S wine
@talayhan
talayhan / gitemail
Created April 2, 2021 12:59 — forked from lifuzu/gitemail
Update email and user name in the git history
git filter-branch -f --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" -o "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
then
GIT_AUTHOR_NAME="User Name";
GIT_AUTHOR_EMAIL="[email protected]";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD