This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
#define NUM_OF_THREAD 10 | |
static int res = 0; | |
int checkIsItPrime(int n) { | |
int i, flag = 0; | |
for (i = 2; i <= n / 2; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mails_raw.txt ==> Ken Thomson 555 1234567 ken0[at]thomson.com ... etc. | |
input="mails_raw.txt" | |
regex="(\w{1,})\[at\](\w{1,}\.\w{1,})" | |
while IFS= read -r line | |
do | |
while [[ $line =~ $regex ]]; do | |
echo "${BASH_REMATCH[1]}@${BASH_REMATCH[2]}" >> mail.txt | |
line=${line#*"${BASH_REMATCH[1]}"} | |
done | |
done < "$input" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage : sudo bash archiveMaster.sh | |
today=$(date +"%Y-%m-%d") | |
archiveFileName="$(whoami)_home_$today.tgz" | |
tar -cvzf $archiveFileName /home/* | |
archiveCounterCommand="tar -tzf $archiveFileName | wc -l" | |
archiveFileCounter=$(eval "$archiveCounterCommand") | |
homeFileCounterCommand="find /home/* | wc -l" | |
homeFileCounter=$(eval "$homeFileCounterCommand") | |
echo $homeFileCounter . "and" . $archiveFileCounter | |
if [[ $homeFileCounter -eq $archiveFileCounter ]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bizzy | |
root:dFexQ | |
ankara |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
biznet 10.0.0.1 hacked by çağatay root 1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Method; | |
public class Demo { | |
public static void main(String[] args) { | |
Class ornekSinif = OrnekSinif.class; | |
Method[] methods = ornekSinif.getDeclaredMethods(); | |
for (int i = 0; i < methods.length; i++){ | |
System.out.println(methods[i].toString()); | |
} | |
} |