Skip to content

Instantly share code, notes, and snippets.

View necenzurat's full-sized avatar
🥺
I still hate JS

Costin Moise necenzurat

🥺
I still hate JS
View GitHub Profile
sudo su -
# stuff we need to build from source
apt-get install libpcre3-dev build-essential libssl-dev
# get the nginx source
cd /opt/
wget http://nginx.org/download/nginx-0.8.54.tar.gz
tar -zxvf nginx*
# we'll put the source for nginx modules in here
Cine mai vine?
Daniel Daianu Prim-vice ASF
Daniel Chiţoiu. Viceprim-ministru, Ministrul Finanțelor Publice
Varujan Vosganian, Ministrul Economiei
Liviu Voinea, Ministrul delegat pentru Buget
Platforma nr. 1 din Romania
Lanseza in spatiul public la data 1 IULIE, ORA 10 SNSPA sala NATO , nevoia unui program si a unei agentii guvernamentale dedicate START-UP-URILOR ŞI SPINOFF-URILOR INOVATIVE.”
Un proiect pentru 50,000 de tineri antreprenori şi pentru viitorul unei generaţii
<?php
/*
db connection shit loaded here
*/
set_time_limit(0);
ini_set('memory_limit', '120M');
include "XmlStreamer.php";
class SimpleXmlStreamer extends XmlStreamer {
<?php
function check_email_address($email) {
// First, we check that there's one @ symbol, and that the lengths are right
if (!preg_match("/^[^@]{1,64}@[^@]{1,255}$/", $email)) {
// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
return false;
}
// Split it into sections to make life easier
$email_array = explode("@", $email);
$local_array = explode(".", $email_array[0]);
<?php
function exclude($needle, $haystack){
foreach ($haystack as $element) {
$pattern = "/".$element."/";
preg_match($pattern, $needle, $matches);
var_dump($matches);
if ($matches)
return TRUE;
else
<?php
//https://gdata.youtube.com/feeds/api/videos?v=2&alt=jsonc&q=oregon%20trail%20hack&max-results=50
for ($i=1; $i <10100 ; $i++) {
$query = urlencode("World At Arms hack");
<?php
$array = array("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15");
echo "<pre>";
function AddElementToArrayAfter($array = "", $element = "", $after = "") {
$count = 0;
(Reading database ... 31934 files and directories currently installed.)
Preparing to replace openssh-server 1:6.0p1-4 (using .../openssh-server_1%3a6.0p 1-4+deb7u1_amd64.deb) ...
Unpacking replacement openssh-server ...
Preparing to replace openssh-client 1:6.0p1-4 (using .../openssh-client_1%3a6.0p 1-4+deb7u1_amd64.deb) ...
Unpacking replacement openssh-client ...
Preparing to replace nginx 1.4.6-1~wheezy (using .../nginx_1.4.7-1~wheezy_amd64. deb) ...
Unpacking replacement nginx ...
Preparing to replace openssl 1.0.1e-2+deb7u4 (using .../openssl_1.
@necenzurat
necenzurat / gist:10769687
Last active August 29, 2015 13:59
insert element to array every x position
<?php
function insertEvery($array, $element = '', $every = null){
if ($every == null) return false;
$index = 0;
foreach($array as $value) {
if (($index + 1) % $every == 0) {
array_splice($array, $index, 0, $element);
}
$index++;
}
function getClientIP() {
if (isset($_SERVER)) {
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
return $_SERVER["HTTP_X_FORWARDED_FOR"];
if (isset($_SERVER["HTTP_CLIENT_IP"]))
return $_SERVER["HTTP_CLIENT_IP"];