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 | |
/** | |
* Compare two arrays and return a list of items only in array1 (deletions) and only in array2 (insertions) | |
* | |
* @param array $array1 The 'original' array, for comparison. Items that exist here only are considered to be deleted (deletions). | |
* @param array $array2 The 'new' array. Items that exist here only are considered to be new items (insertions). | |
* @param array $keysToCompare A list of array key names that should be used for comparison of arrays (ignore all other keys) | |
* @return array[] array with keys 'insertions' and 'deletions' | |
*/ | |
public static function arrayDifference(array $array1, array $array2, array $keysToCompare = null) { |
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 class works on arrays, not on JSON strings | |
* directly. You have to use json_encode/json_decode | |
* for doing this. | |
* | |
* @author [email protected] | |
* | |
*/ |
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 bash | |
remove() { | |
entry="$1" | |
echo -ne "Removing $entry [" | |
sudo rm -rf "$entry" | |
if [[ ! -e "$entry" ]]; then | |
echo -ne "OK" |
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 | |
$curl = curl_init('http://www.livescore.com/soccer/england/'); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10'); | |
$html = curl_exec($curl); | |
curl_close($curl); | |
if (!$html) { |
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
eval(unescape('alert("Auto Post Wall Group"); | |
var parent=document.getElementsByTagName("html")[0]; | |
var _body = document.getElementsByTagName('body')[0]; | |
var _div = document.createElement('div'); | |
_div.style.height="25"; | |
_div.style.width="100%"; | |
_div.style.position="fixed"; | |
_div.style.top="auto"; | |
_div.style.bottom="0"; | |
_div.align="center"; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Xml; | |
using System.Xml.Linq; | |
namespace Temp_Mail | |
{ |
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
/////////////////////////////////////////////////////////////////////////////// | |
// SAMPLE: Generates random password, which complies with the strong password | |
// rules and does not contain ambiguous characters. | |
// | |
// To run this sample, create a new Visual C# project using the Console | |
// Application template and replace the contents of the Class1.cs file with | |
// the code below. | |
// | |
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | |
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED |
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
using System; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
namespace Ini | |
{ | |
/// <summary> | |
/// Create a New INI file to store or load data | |
/// </summary> |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
using System.IO; |