Skip to content

Instantly share code, notes, and snippets.

@Stasonix
Stasonix / test.php
Created June 24, 2012 07:23
Fastcode
<?php
echo "All is very good!";
?>
@Stasonix
Stasonix / live.php
Created June 30, 2012 11:38
simple parse
<?php
$html = file_get_contents($page);
preg_match_all("/(<h3>(\d+:\d+)<\/h3>).+?(<h5>(.*?)<\/h5>)/is",$html,$matches);
echo "<h2 align='center'>LIVE</h2>";
echo "<br /><hr>";
<?php
if (!isset($_GET['params']))
{
if ($result = $pdo->query("SELECT a.title, b.category FROM `chase` AS a
JOIN `categories` AS b ON a.cat_id = b.id"))
{
$result->execute();
@Stasonix
Stasonix / glarr.cs
Created July 12, 2012 08:46
global arrays C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Practices.ServiceLocation;
@Stasonix
Stasonix / doimg.cs
Created July 26, 2012 07:16
Test IMG project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Printing;
@Stasonix
Stasonix / Form1.cs
Created July 26, 2012 07:17
Test IMG project
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;
namespace testimg
@Stasonix
Stasonix / doimg.cs
Created July 26, 2012 08:34
Test IMG project (SO) doimg.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Printing;
@Stasonix
Stasonix / Form1.cs
Created July 26, 2012 08:34
Test IMG project (SO) form1.cs
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;
@Stasonix
Stasonix / Form1.cs
Created July 26, 2012 08:52
GLOBAL HOOK example C#
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.Text.RegularExpressions;
using System.IO;
@Stasonix
Stasonix / ipua.php
Created July 28, 2012 05:56
PHP Украинский ip ( функция проверки )
<?php
/* функция проверки является ли пользователь из Украины
* @param (string) ip - ip адрес пользователя
* @return (bool) - если пользователь из Украины вернет TRUE, если нет, то FALSE
*/
function ipUA($uIp)
{
$bytes = explode(".",$uIp);