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 detect_utf_encoding($data) { | |
| $UTF32_BIG_ENDIAN_BOM = chr(0x00) . chr(0x00) . chr(0xFE) . chr(0xFF); | |
| $UTF32_LITTLE_ENDIAN_BOM = chr(0xFF) . chr(0xFE) . chr(0x00) . chr(0x00); | |
| $UTF16_BIG_ENDIAN_BOM = chr(0xFE) . chr(0xFF); | |
| $UTF16_LITTLE_ENDIAN_BOM = chr(0xFF) . chr(0xFE); | |
| $UTF8_BOM = chr(0xEF) . chr(0xBB) . chr(0xBF); | |
| $first2 = substr($data, 0, 2); |
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 | |
| /*====================================*/ | |
| /*=== Determine numbers HTML codes ===*/ | |
| /*====================================*/ | |
| function NumbertoHtmlCodes($number){ | |
| $number = (int)$number; | |
| if ($number === 0) { | |
| $html = "0"; | |
| }elseif ($number === 1) { | |
| $html = "1"; |
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 | |
| /*====================================*/ | |
| /*=== Send email with attachment ====*/ | |
| /*====================================*/ | |
| function mail_attachment($to, $subject, $message, $from, $file, $reply_to) { | |
| // $file should include path and filename | |
| $filename = basename($file); | |
| $file_size = filesize($file); | |
| $content = chunk_split(base64_encode(file_get_contents($file))); | |
| $uid = md5(uniqid(time())); |
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 | |
| /* creates a compressed zip file */ | |
| function create_zip($files = array(), $destination = '', $overwrite = false) { | |
| //if the zip file already exists and overwrite is false, return false | |
| if(file_exists($destination) && !$overwrite) { return false; } | |
| //vars | |
| $valid_files = array(); | |
| //if files were passed in... | |
| if(is_array($files)) { | |
| //cycle through each file |
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 ThreeDigitsInWords($Number){ | |
| if ($Number == 0){ | |
| return ""; | |
| } | |
| $InWords = ""; | |
| $Units_Place = array("zero","one","two","three","four","five","six","seven","eight","nine"); | |
| $Tens_Place = array(1=>"ten","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"); |
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
| #include <node.h> | |
| #include <v8.h> | |
| #include <stdio.h> | |
| #include <time.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> |
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
| { | |
| "targets": [{ | |
| "target_name": "CutyCapt", | |
| "sources": ["CutyCapt.cc"], | |
| 'conditions': [ | |
| ['OS=="linux"', { | |
| 'cflags': [ | |
| '-fPIC', | |
| '-std=c++11', | |
| '<!@(pkg-config --cflags Qt5Core Qt5Svg Qt5WebKit Qt5WebKitWidgets Qt5Network)' |
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
| #include <node.h> | |
| #include <v8.h> | |
| #include <stdio.h> | |
| #include <X11/X.h> | |
| #include <X11/Xlib.h> | |
| #include <X11/Xutil.h> | |
| using namespace node; | |
| using namespace v8; |
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
| #!/bin/bash | |
| wget -q -O - https://mail.google.com/a/gmail.com/feed/atom --http-user=${1} --http-password="${2}" --no-check-certificate | grep -oP '(?<=<fullcount>).*?(?=</fullcount>)' |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Pure Javascript CountDown</title> | |
| <meta name="description" content="Pure Javascript CountDown"> | |
| <meta name="author" content="FlopUp.Net"> | |
| <style type="text/css"> |