Skip to content

Instantly share code, notes, and snippets.

View mezklador's full-sized avatar
💭
I may be slow to respond.

Stephane ESTEVE mezklador

💭
I may be slow to respond.
View GitHub Profile
@Zireael-N
Zireael-N / Checksum.py
Last active March 14, 2023 07:48
Python script that calculates SHA1, SHA256, MD5 checksums of a given file.
#!/usr/bin/python
import hashlib
import os
import sys
if len(sys.argv) < 2:
sys.exit('Usage: %s filename' % sys.argv[0])
if not os.path.exists(sys.argv[1]):
#!/bin/bash
# Thanks to Martin Los for his guide: http://www.martinlos.com/?p=41
URLS=("http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.3.tar.gz" "http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz" "http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz")
for i in "${URLS[@]}"
do
echo $i
curl -O -L $i
@carbontwelve
carbontwelve / curl_example.php
Created March 27, 2014 13:54
PHP Curl to check if url is alive
<?php
function check_alive($url, $timeout = 10, $successOn = array(200, 301)) {
$ch = curl_init($url);
// Set request options
curl_setopt_array($ch, array(
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_NOBODY => true,
CURLOPT_TIMEOUT => $timeout,
@michsch
michsch / _config.scss
Created July 19, 2012 11:29
Font size configuration with Sass (SCSS)
/* font size & line height in px */
$font-size-body-px: 14;
$line-height-px: 21;
/* calculate font-size (in %) and line-height (in em) */
$font-size-body: pc($font-size-body-px, 16);
$line-height: em($line-height-px, $font-size-body-px);