This file contains 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
sudo apt-get -y install build-essential | |
mkdir src | |
cd src | |
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz | |
#download all patches | |
for i in $(seq -f "%03g" 0 25); do wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done | |
tar zxvf bash-4.3.tar.gz | |
cd bash-4.3 | |
#apply all patches | |
for i in $(seq -f "%03g" 0 25);do patch -p0 < ../bash43-$i; done |
This file contains 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
From 14a75ecbab4812acbe49e00ed0dd7c34375a9306 Mon Sep 17 00:00:00 2001 | |
From: "Andrea BACCEGA" <vekexasia@gmail.com> | |
Date: Mon, 7 Jul 2014 08:16:51 +0000 | |
Subject: [PATCH] Added pagination Fixed search with a real working LIKE | |
--- | |
domain_mapping.php | 33 ++++++++++++++++++++++++++++++--- | |
1 file changed, 30 insertions(+), 3 deletions(-) | |
diff --git a/domain_mapping.php b/domain_mapping.php |
This file contains 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 | |
$arr = array(); | |
for($i = 4; $i <= 1000000; $i++){ | |
if(!isPrime($i)){ | |
array_push($arr,$i); | |
} | |
} | |
function isPrime($number){ | |
if ($number % 2 == 0) { |
This file contains 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 | |
$arr = array(1,2,3,4,5,6,7,8,9,10); | |
$arrLess = array(); | |
$arrGret = array(); | |
$total = 0; | |
$nuEle = count($arr); | |
foreach ($arr as $arr_ele){ | |
$total += $arr_ele; | |
} |
This file contains 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 | |
## This program is free software: you can redistribute it and/or modify | |
## it under the terms of the GNU General Public License as published by | |
## the Free Software Foundation, either version 3 of the License, or | |
## (at your option) any later version. | |
## | |
## This program is distributed in the hope that it will be useful, | |
## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains 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
var fs = require('fs'), | |
less = require('less'), | |
compressor = require('node-minify'), | |
directory = 'bootstrapless/', | |
rootLess = 'bootstrap.less'; | |
var parser = new(less.Parser)({ | |
paths: [directory] // Specify search paths for @import directives | |
}); |
This file contains 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
<a href='http://www.example.com' onClick='javascript:alert("blabla");'>Click Me!</a> |
This file contains 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
/** | |
* Adds the event to a calendar. It lets the user choose the calendar | |
* @param ctx Context ( Please use the application context ) | |
* @param title title of the event | |
* @param dtstart Start time: The value is the number of milliseconds since Jan. 1, 1970, midnight GMT. | |
* @param dtend End time: The value is the number of milliseconds since Jan. 1, 1970, midnight GMT. | |
*/ | |
private static void addToCalendar(Context ctx, final String title, final long dtstart, final long dtend) { | |
final ContentResolver cr = ctx.getContentResolver(); | |
Cursor cursor ; |
This file contains 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
private Boolean firstTime = null; | |
/** | |
* Checks if the user is opening the app for the first time. | |
* Note that this method should be placed inside an activity and it can be called multiple times. | |
* @return boolean | |
*/ | |
private boolean isFirstTime() { | |
if (firstTime == null) { | |
SharedPreferences mPreferences = this.getSharedPreferences("first_time", Context.MODE_PRIVATE); | |
firstTime = mPreferences.getBoolean("firstTime", true); |
This file contains 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
CREATE TABLE IF NOT EXISTS `resetpasswordtokens` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`userID` int(11) NOT NULL, | |
`token` char(32) NOT NULL, | |
`status` set('used','new') NOT NULL DEFAULT 'new', | |
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`), | |
KEY `userID` (`userID`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; |