Skip to content

Instantly share code, notes, and snippets.

View twilight1794's full-sized avatar
🧃
Sic parvis, magna

Giovanni Alfredo Garciliano Díaz twilight1794

🧃
Sic parvis, magna
View GitHub Profile
<?php
$user_agent = $_SERVER['HTTP_USER_AGENT'];
echo $user_agent;
function getBrowser($user_agent){
if(strpos($user_agent, 'Maxthon') !== FALSE)
return "Maxthon";
elseif(strpos($user_agent, 'SeaMonkey') !== FALSE)
return "SeaMonkey";
elseif(strpos($user_agent, 'Vivaldi') !== FALSE)
return "Vivaldi";
@twilight1794
twilight1794 / qotd.py
Created September 30, 2017 03:50
QOTD server
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Date of version: 5/may/2017 (G. C.)
# A generic class
# Copyright © 2016 Giovanni Alfredo Garciliano Díaz
# This file is part of rdhttpd
# rdhttpd is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@twilight1794
twilight1794 / client.c
Created October 8, 2017 02:50
Simple TCP/IP msg server/client
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
void error(char * msg) {
@twilight1794
twilight1794 / keybase.md
Last active August 25, 2020 21:25
keybase.md

Keybase proof

I hereby claim:

  • I am twilight1794 on github.
  • I am raiponce (https://keybase.io/raiponce) on keybase.
  • I have a public key whose fingerprint is 1D2A 7CC2 74BD B8FE 7DA0 74FD 4584 325D 1593 BC80

To claim this, I am signing this object: