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
#just a secure sudo | |
bic_sudo() { | |
echo -e "\e[0;31mAre you sure\e[00;m that you want to use sudo?"; | |
echo -e "\e[0;34mMaybe you can do it in other way..." | |
echo -e -n '\e[00m' | |
read suresudo; | |
if [ $suresudo == "yes" ] || [ $suresudo == "y" ] ; | |
then |
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 wicked script composer fix for a wicked unix | |
bic_wicked_composer() { | |
org_path=$PWD | |
sudo mkdir /tmp/mycomposerpath | |
sudo chown $USER /tmp/mycomposerpath | |
mv $org_path/* /tmp/mycomposerpath |
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
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_comments); | |
String htmlComments = getHtmlComment("yourId", "yourShortName"); | |
webDisqus = (WebView) findViewById(R.id.disqus); | |
// set up disqus | |
WebSettings webSettings2 = webDisqus.getSettings(); |
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
$.post("/load/newcard", | |
$("#stored_card_form").serialize(), | |
function(data) { | |
check_data_form(data); | |
}); |
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 controller */ | |
//$error = array('error' => $form->getMessages()); | |
//$this->_helper->json( json_encode($error) ); | |
/**/ | |
//post get json objects... | |
function post_confirmation() { | |
please_wait_ui(); | |
$.post("/load/confirm", |
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
#just a secure sudo | |
bic_sudo() { | |
echo -e "\e[0;31mAre you sure\e[00;m that you want to use sudo?"; | |
echo -e "\e[0;34mMaybe you can do it in other way..." | |
echo -e -n '\e[00m' | |
read suresudo; | |
if [ $suresudo == "yes" ] || [ $suresudo == "y" ] ; | |
then |
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
/* | |
The aim of this test is to check the performance (as speed) and the memory creating instances of objects with public or private methods. | |
We want to see if create a private method in js really hurts the performance. | |
For that we will compare the performance creating so many instances and checking the performance | |
*/ | |
function Public(){ | |
this.publicMethod = function(){ |
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
#solve symfony linux permission problems | |
sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs | |
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs |
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 rutes | |
tree -fi | sed -r 's/\.\/|.md//g' | tail -n +2 | \ | |
while read CMD; do | |
echo '['$CMD']('$CMD')' | |
echo '' | |
done > list-files.md | |
#check the file length | |
numberLines=$(cat list-files.md | wc -l) |
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
/** | |
* Test with / on the url | |
* | |
* @Route("/test/{test}", requirements={"test" = "(.*)"}) | |
* @Method("GET") | |
* @Template() | |
*/ | |
public function testAction($test) { | |
if($otherLinks) | |
{ |
OlderNewer