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
$('div[name="modules_div"]').each(function(){ | |
id = $(this).attr('id') | |
$('#' + id + ' table tbody').children().each(function(k, v){ | |
i = 0; | |
text = ''; | |
$(this).children().each(function(){ | |
if(i == 0){ | |
text = $(this).text() |
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 <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
int main() { | |
long cpu_online = -1; | |
long cpu_max = -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
find . -name 'version.php' -path '*wp-includes/*' -print -exec grep '$wp_version =' {} \; -exec echo '' \; |
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
find . -name '*.php' -print0 | xargs -0 -I file grep -inH "expiration_date =" 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
String.prototype.ucwords = function() { | |
str = this.toLowerCase(); | |
return str.replace(/(^([a-zA-Z\p{M}]))|([ -][a-zA-Z\p{M}])/g, | |
function(s){ | |
return s.toUpperCase(); | |
}); | |
}; |
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 A2N($alphabet) { | |
$alphabet = strtoupper($alphabet); | |
$result = -(ord($alphabet) - 69); | |
return $result > 0 && $result <= 4 ? $result : 0; | |
} | |
function calculateGPA($grades) { |
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/sh | |
sudo apt-get install apache2-prefork-dev libxml2 libxml2-dev apache2-dev | |
mkdir ~/modbuild/ && cd ~/modbuild/ | |
wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.c | |
wget http://apache.webthing.com/svn/apache/filters/mod_xml2enc.h | |
sudo apxs2 -aic -I/usr/include/libxml2 ./mod_xml2enc.c | |
cd ~ | |
sudo rm -rfd ~/modbuild/ | |
sudo service apache2 restart |
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 A2N($alphabet) { | |
// if alphabet like AB, BA.. | |
if (strlen($alphabet) > 1) { | |
$result = 0; | |
foreach (str_split($alphabet) as $chr) { | |
$result += A2N($chr); | |
} | |
return $result / count(str_split($alphabet)); |
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
CHESS Engine Categorized | |
by strong | |
- Stockfish | |
- Gull | |
- Fruit | |
- GNU Chess | |
by Comment / Clean Code / didactic | |
- Crafty |
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
# install openjdk | |
sudo apt-get install openjdk-7-jdk | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools | |
# install all sdk packages |
OlderNewer