This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This function will check a number (Credit Card, IMEI, etc.) versus the luhn | |
* algorithm. (Both mod 10 and mod5) | |
* | |
* More information on the luhn algorigthm: http://en.wikipedia.org/wiki/Luhn_algorithm | |
* | |
* From the Wikipedia entry: | |
* As an illustration, if the account number is 49927398716, it will be validated as follows: | |
1. Double every second digit, from the rightmost: (1×2) = 2, (8×2) = 16, (3×2) = 6, (2×2) = 4, (9×2) = 18 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function check_image_support() | |
{ | |
echo 'Checking Image Support: '."\n"; | |
//IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP | IMG_XPM | |
if (imagetypes() & IMG_GIF) | |
echo "GIF: \tYes"; | |
else | |
echo "GIF: \tNo"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./configure \ | |
--prefix=/usr \ | |
--mandir=/usr/share/man \ | |
--infodir=/usr/share/info \ | |
--sysconfdir=/private/etc \ | |
--with-apxs2=/usr/sbin/apxs \ | |
--enable-cli \ | |
--with-config-file-path=/etc \ | |
--with-libxml-dir=/usr \ | |
--with-openssl=/usr \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "np900x3b clickpad" | |
MatchIsTouchpad "on" | |
MatchDevicePath "/dev/input/event*" | |
Option "ClickPad" "1" | |
Option "ClickFinger1" "1" | |
Option "ClickFinger2" "3" | |
Option "ClickFinger3" "2" | |
Option "PalmDetect" "1" | |
Option "PalmMinWidth" "5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import pygal | |
import requests | |
import simplejson as json | |
from timelib import strtodatetime | |
import datetime | |
url = 'http://api.whatpulse.org/pulses.php?user=sgricci&format=json' | |
if __name__ == "__main__": | |
res = requests.get(url) |