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
using System; | |
using System.Numerics; | |
namespace Common | |
{ | |
/// <summary> | |
/// Arbitrary precision decimal. | |
/// All operations are exact, except for division. Division never determines more digits than the given precision. | |
/// Source: https://gist.github.com/JcBernack/0b4eef59ca97ee931a2f45542b9ff06d | |
/// Based on https://stackoverflow.com/a/4524254 |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /your/root/path; | |
index index.html; | |
server_name you.server.com; |
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> | |
int array[]={ 34, 2, 54, -6, -49}; | |
#define S sizeof(array)/sizeof(array[0]) | |
int main() | |
{ | |
int d = -1; | |
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
#!ruby | |
require 'net/http' | |
require 'uri' | |
def scrapEmails( urlString ) | |
url = URI.parse( urlString ) | |
req = Net::HTTP::Get.new(url.path) | |
res = Net::HTTP.start(url.host, url.port) { |http| http.request(req) } | |
emails = res.body.scan( /[A-Za-z0-9]+[@ | (at) | (AT) ][A-Za-z0-9]+\.[A-Za-z]+/i ) | |
return emails |
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
typedef union two_bytes { | |
unsigned short s; | |
unsigned char bytes[ 2 ]; | |
} two_bytes_t; | |
int is_big_endian( void ) | |
{ | |
two_bytes_t check; | |
check.s = 1; |
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
# as -o hello-world.o hello-world.s ; ld -o hello-world hello-world.o | |
.data | |
hello_world_str: .ascii "Hello World!\n" | |
hello_world_len: .int 13 | |
.text | |
.globl _start | |
_start: | |
movl $4, %eax # load sys call 4 into EAX |
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> | |
int main() | |
{ | |
char myarray[ 256]; | |
const char* mystring = "Hello my peeps."; | |
size_t array_size = sizeof(myarray); | |
size_t string_size = sizeof(mystring); |
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
# INSTALL INSTRUCTIONS: save as ~/.gdbinit | |
# | |
# DESCRIPTION: A user-friendly gdb configuration file. | |
# | |
# REVISION : 7.3 (16/04/2010) | |
# | |
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit, | |
# truthix the cyberpunk, fG!, gln | |
# | |
# FEEDBACK: https://www.reverse-engineering.net |
NewerOlder