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 a(int x,int y){ | |
return 1; | |
} | |
double b(int x, int y){ | |
return 1.5; | |
} |
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
a.out: file format elf64-x86-64 | |
Disassembly of section .init: | |
0000000000001000 <_init>: | |
1000: f3 0f 1e fa endbr64 | |
1004: 48 83 ec 08 sub rsp,0x8 | |
1008: 48 8b 05 c1 2f 00 00 mov rax,QWORD PTR [rip+0x2fc1] # 3fd0 <__gmon_start__@Base> |
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
#define _POSIX_C_SOURCE 199309L | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <time.h> | |
#include <math.h> | |
bool is_prime(int n) | |
{ | |
if (n < 2) | |
return false; |
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
#define _POSIX_C_SOURCE 200809L | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <string.h> | |
#include <time.h> | |
int min(int a, int b, int c) | |
{ | |
if (a < b && a < c) |
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
static size_t count_segment(char const *s, char c) | |
{ | |
size_t counter = 0; | |
int i = 0; | |
while (s[i]) | |
{ | |
if (s[i] == c) | |
{ | |
i++; | |
continue; |
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 /usr/share/cgit; | |
try_files $uri @cgit; | |
location ~ /.+/(info/refs|git-upload-pack) { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; |
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
#!/usr/bin/awk -f | |
# Markov chain exercice from chapter 3 (design) of the book The practice of programming. | |
BEGIN { | |
PREFIX_LEN = 2 | |
# need space to detect is the end since other words can't have spaces in them | |
SUFFIX_END = "< END >" | |
# maximum number of words in the output | |
MAX_WORDS = 1000 |
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
#!/usr/bin/python3 | |
import os | |
import sys | |
import itertools | |
import requests | |
from bs4 import BeautifulSoup | |
url_fmt = "https://www.omgbeaupeep.com/comics/Avatar_The_Last_Airbender/{:03}/{}/" | |
dir_name = "avatar_comics" |
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
#!/bin/sh | |
[ $# -eq 0 ] && echo "Usage $0 REPOSITORY ..." && exit 1 | |
for repo in $@; do | |
if [ ! -d $repo ] || [ ! -d $repo/.git ]; then | |
echo "$repo: Is not a repository" | |
continue | |
fi |
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
#/bin/sh | |
[ $# -eq 0 ] && echo "Usage: $0 name" && exit 1 | |
repo="/var/www/git/$1.git" | |
ssh [email protected] <<EOF | |
mkdir $repo && | |
cd $repo && | |
git init --bare |
NewerOlder