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
<?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"];
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives and /usr/share/doc/apache2-common/README.Debian.gz about
# Debian specific hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

<?php
/*replace https uris for facebook, fuck facebook */
function https_to_http(){
$str = preg_replace('#^https?://#', '', get_permalink() );
return "http://".$str;
}
@necenzurat
necenzurat / clean.php
Created December 23, 2014 16:15
Wordpressez fuckedz
<?php
$meh = array(
"/example.com/public/wp-content/plugins/revslider/inc_php/framework/settings_advances.class.php",
);
function clean($filename) {
$file = file($filename);
<?php
/**
* Class to improve the seo of the site
*
* @package OC
* @category SEO
* @author Chema <chema@open-classifieds.com>
* @version 1.0
* @date 21-02-2014
* @url http://garridodiaz.com/phpseo/