Skip to content

Instantly share code, notes, and snippets.

@e-vural
e-vural / ubuntu auto ssl renew on ssh access
Last active May 30, 2019 09:21
Ubuntu renew auto ssl on ssh access
//only this
certbot renew
@e-vural
e-vural / gist:8e105c72644763cb8e6a3ad0847d09d1
Created February 3, 2018 08:42
Symfony form dosen't request post and get
if your route starting /app this problem.
@e-vural
e-vural / combodate.js
Created January 30, 2018 14:24
Combodate minDate - maxDate minMonth- maxMonth perfect
/**
* Combodate - 1.0.4
* Dropdown date and time picker.
* Converts text input into dropdowns to pick day, month, year, hour, minute and second.
* Uses momentjs as datetime library http://momentjs.com.
* For i18n include corresponding file from https://github.com/timrwood/moment/tree/master/lang
*
* Confusion at noon and midnight - see http://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight
* In combodate:
* 12:00 pm --> 12:00 (24-h format, midday)
### Profile entity
class Profile{
... (your entity codes)
//ONE TO MANY RELATİONSHİP
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Graduate",mappedBy="profile",cascade={"all"})
*/
private $graduates;
$request->isXmlHttpRequest();
@e-vural
e-vural / deleteDirectory.php
Created November 24, 2017 14:53
Delete All Directory And Files In a Directory
public function deleteDirectory($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != '.' && $object != '..') {
(filetype($dir . '/' . $object) == 'dir') ? $this->deleteDirectory($dir . '/' . $object) : unlink($dir . '/' . $object);
}
}
reset($objects);
return rmdir($dir) ? true : false;
//This line is orjinal line.
//self.closeButton => close button (Done button)
//flexibleSpaceButton => space between two buttons
//self.backButton => back button left arrow
//fixedSpaceButton => mini space
//self.forwardButton => forward button right arrow
[self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]];
//For example if you change this line below,toolbar look like | ◄ ► |. Done button removed.
[self.toolbar setItems:@[fixedSpaceButton, self.backButton, flexibleSpaceButton, self.forwardButton , fixedSpaceButton]];
//Videoları telefonun video oynatıcısında oynatma (play all video with native phone videoplayer )
cordova plugin add https://github.com/raulduran/VideoPlayer.git
https://github.com/raulduran/VideoPlayer
bu plugin ileri geri durdur başlat özelliğğ var alaltakinden daha iyi.( start ,stop feature) this is best
//Videoları telefonun video oynatıcısında oynatma (play all video with native phone videoplayer )
https://github.com/moust/cordova-plugin-videoplayer
No option
npm config set prefix /usr/local
full : http://blog.webbb.be/command-not-found-node-npm/
select2.on('select2:select',function() {
var id = $(this).find('option:selected').text().replace(/\s/g,'_');
$(this).closest('td').siblings('td').find('select.select2').children('option[id="' + id + '"]').attr('disabled', true);
var selected_option = $(this).find('option:selected');
var selected_all_options = $(this).closest('td').siblings('td').find('select.select2').children('option:selected')
selected_all_options.push(selected_option)