Sample server
server {
listen 80;
listen [::]:80;
server_name domain.com www.domain.com;
return 302 https://$server_name$request_uri;
}
Sample server
server {
listen 80;
listen [::]:80;
server_name domain.com www.domain.com;
return 302 https://$server_name$request_uri;
}
#!/usr/bin/env bash | |
# Change this to the dimensions you want the screenshots to be in | |
width="1366" | |
height="768" | |
# Check if the directory and URLs are provided as arguments | |
if [ $# -lt 2 ]; then | |
echo "Usage: $0 <directory> <url1|urls_file>" | |
exit 1 |
#include <stdio.h> | |
#include <sys/ioctl.h> | |
#include <unistd.h> | |
int main(void) | |
{ | |
char name[] = "pwnwriter"; | |
struct winsize pwnwriter; //using a structure defined in unistd.h library..... |
#include <stdio.h> | |
#include <pthread.h> | |
#define THREAD_NUM 5 | |
void * workerThreadFunc(void *tid){ | |
char buf[35]; | |
long * myID = (long *) tid; | |
printf("Hello world this is thread no. %ld\n", *myID); | |
} |
#!/usr/bin/tcc -run | |
#include <stdio.h> | |
#include <stdbool.h> | |
int main(){ | |
char a = 'C'; // single character %c | |
char b[] = "Nabeen"; // array of characters %s | |
float c = 3.141592; // 4 bytes (32 bits of precision) 6 - 7 digits %f |
#!/bin/sh | |
xrandr --output eDP-1 --mode 1366x768 --output HDMI-1 --same-as eDP-1 |
#!/usr/bin/env bash | |
# Enable wireless debugging and connect using adb. | |
command -v adb su >/dev/null || exit 1 | |
# Variables | |
_SUDO="su -c" | |
_ADB="adb" | |
# Functions |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int main(int argc, char* argv){ | |
time_t random=time(NULL); | |
srand(random); | |
printf("%d\n", rand()); | |
return 0; |
//Demonstration of pipes in c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/wait.h> | |
#include <unistd.h> | |
int main(int argc, char* argv){ | |
int fd[2]; | |
if(pipe(fd) == -1){ | |
return 1; |
/*This gist consists of the solution of ITSNP posted on April 28 | |
Link of the post " https://www.facebook.com/101470728764629/posts/336507348594298/ " | |
Here's the solution in c ! */ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
int |