Skip to content

Instantly share code, notes, and snippets.

@olto
olto / requestUrl.py
Last active December 17, 2015 07:13
import requests
""" Response Status Code url
Response Code Source url """
def analyse_url():
enter_url = input("Enter url : ")
req = requests.get(enter_url)
print("Response Code " + str(req.status_code))
print("\nResponse :\n" + req.text)
@olto
olto / time.py
Created November 30, 2015 15:46
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 30 16:30:54 2015
@author: olto
"""
import time
def test(a):
print(bin(a))
@olto
olto / sha256.py
Last active November 18, 2015 05:19
#!/usr/bin/env python
import hashlib
import os
h = hashlib.sha256()
name = ""
name = h.update
name = (input("Type Text(sha256):>> "))
result = h.hexdigest()
function Resizer(){
$('.element').css('height', $(window).height())
}
Resizer();
$(window).resize(function(){
Resizer();
})
@olto
olto / play.py
Last active January 25, 2016 04:57
# Jeu Roulette
import os
from random import randrange
from math import ceil
# Déclaration des variables de départ
argent = 1000 # On a 1000 $ au début du jeu
continuer_partie = True # Booléen qui est vrai tant qu'on doit
# continuer la partie
#! /usr/bin/env python
#coding=utf-8
from random import randrange
choix=0
while choix==0:
nb_car=input("Entrez le nombre de caractères du mot de passe à générer : ")
try:
#! /usr/bin/env python
#coding=utf-8
from random import randint
plateau = []
for x in range(0, 5):
plateau.append(["O"] * 5)
#!/usr/bin/perl -w
use strict;
# créé une liste de mots, transforme les majuscules de ces mots en minuscules, supprime les # chiffres appartenant aux mots, supprime les mots vides etaffiche la liste des mots ainsi
# transformés dans l'ordre lexical
my @r = qw(Un programme Perl est 5 fois plus rapide a ecrire);
map { tr/A-Z/a-z/; s/\d//g; } @r;
foreach (sort grep !/^$/, @r) { print "$_\n"; }
@olto
olto / firewall-olto
Last active November 8, 2018 11:14
#!/bin/bash
# Script iptables by olto
# Réinitialisation
iptables -F
echo - Réinitialisation... : [OK]
# Suppression des chaînes utilisateurs
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 7 22:20:06 2015
@author: olto
"""
points = 9
def test(message):
message = points