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
$(document).on('click', '.follow-action, .no-events-follow-action', function (ev) { | |
var fid="";var ftype="";var t= $(this); var btntext="Following"; | |
if(logged){ | |
try{ | |
var fid =$(this).attr('data-id'); | |
var ftype =$(this).attr('data-type'); | |
}catch(e){} | |
if(fid!="" && ftype!=""){ | |
if(ftype=="organizer"){ |
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 get_started_block = document.getElementById("get-started"); | |
var float_button = document.getElementById("float-btn"); | |
function handler(entries, observer) { | |
for (entry of entries) { | |
if (entry.isIntersecting) { | |
float_button.style.display = "none"; | |
}else{ | |
float_button.style.display = "block"; | |
} |
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 | |
/** | |
Load a gravatar. | |
*/ | |
function gravatar($email = '', $rating = 'pg') { | |
$default = "path/to/defava.png"; // Set a Default Avatar | |
$email = md5(strtolower(trim($email))); | |
$gravurl = "http://www.gravatar.com/avatar/$email?d=$default&s=60&r=$rating"; | |
return '<img src="'.$gravurl.'" width="60" height="60" border="0" alt="Avatar">'; |
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
function sort_by_value($a, $b) { | |
return $b['score'] > $a['score'] ? 1 : -1; | |
} | |
//sort using usort | |
usort($events_temp, 'sort_by_value'); |
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
----------Edit cron job --------------------- | |
-> write comman "crontab -e" | |
-> press "i" | |
-> go to last cron job. | |
-> add new cron job | |
-> press ESC -> press ":wq" | |
----------- File Permission give ------------ | |
*Give permission to .sh file* |
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
********* | |
Open file path | |
-------------------- | |
$myfile = fopen("data/finalized-ids.txt", "a+") or die("Unable to open file!"); | |
Write something into file | |
-------------- | |
fwrite($myfile, "event_ids,". PHP_EOL); |
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 update | |
sudo apt install curl | |
sudo apt install git-all | |
sudo apt-get install nodejs | |
sudo apt install npm | |
npm install (download all required) | |
---------- | |
sudo npm install express |
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
Clone tables | |
--------------- | |
CREATE TABLE app_cities_temp LIKE app_cities; | |
INSERT INTO app_cities_temp SELECT * FROM app_cities; |
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
List: | |
Using below command, you can display all the processes with status. | |
pm2 list | |
----------------------------------------------- | |
Stop: | |
To stop an application, you can use below command. |
OlderNewer