Skip to content

Instantly share code, notes, and snippets.

View leoodz's full-sized avatar
⌨️
Focusing

Leo Pham leoodz

⌨️
Focusing
View GitHub Profile
using System;
namespace ExquisiteCorpse
{
class Program
{
static void Main(string[] args)
{
RandomMode();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Aguillar Family Wine Festival</title>
<link rel="stylesheet" type="text/css" href="reset.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
</head>
global _start
section .text
_start: mov rax, 1 ; system call for write
mov rdi, 1
mov rsi, message ; dia chi cua string can output
mov rdx, 13 ; so bytes
syscall ; goi system write
mov rax, 60 ; exit
xor rdi, rdi ; exit code 0
#include <iostream>
#include <stdlib.h>
#include <windows.h>
using namespace std;
void gotoxy(int x, int y);
void setcolor(WORD color);
void setForeGroundAndBackGroundColor(int ForeGroundColor,int BackGroundColor);
void clearscreen();
void drawpixel( unsigned char x, unsigned char y, unsigned char Color);
//https://gist.github.com/85d8b74256be14e32394dfb6273d1f6f
const prompt = require('prompt-sync')({sigint: true});
const hat = '^';
const hole = 'O';
const fieldCharacter = '░';
const pathCharacter = '*';
//define class
const team = {
_players: [
{firstName: "Ray",
lastName: "Yao",
age: 28},
{firstName: "Josh",
lastName: "Wilcox",
age: 30},
{firstName: "Teja",
lastName: "Gotimukala",
<?php
function logIP()
{
$ipLog="logfile.htm"; // tên file và định dạng file (.txt hoặc .html đều ok)
$register_globals = (bool) ini_get('register_gobals');
if ($register_globals) $ip = getenv(REMOTE_ADDR);
else $ip = $_SERVER['REMOTE_ADDR'];
<?php
$iplogfile = 'logs/ip.html';
date_default_timezone_set("Asia/Ho_Chi_Minh");
$ipaddress = $_SERVER['REMOTE_ADDR'];
$webpage = $_SERVER['SCRIPT_NAME'];
$timestamp = date('d/m/Y h:i:s');
$browser = $_SERVER['HTTP_USER_AGENT'];
$location = file_get_contents('http://api.ipstack.com/'.$ipaddress.'?access_key=29eb9a6258c4c6f241ecad2eefdf9907&format=1');
$data = <<<EOT
@leoodz
leoodz / dictionary.py
Created February 27, 2020 16:49
Với số nguyên n nhất định, hãy viết chương trình để tạo ra một dictionary chứa (i, i*i)
n = int(input("Gía trị của số nguyên: "))
d = dict()
for i in range (1, n+1):
d[i] = i*i
print(d)
@leoodz
leoodz / giaithua.py
Created February 27, 2020 16:43
Giai thừa
x = int(input("Giai thừa của: "))
def giaithua(x):
if x == 0:
return 1
return x*giaithua(x-1)
print(giaithua(x))