Skip to content

Instantly share code, notes, and snippets.

View themodernpk's full-sized avatar

Pradeep Kumar themodernpk

View GitHub Profile
$(document).on('slidePanel::afterLoad', function(e, api) {
$.components.init('material', api.$panel);
$("#addItemForm").formValidation({
framework: 'bootstrap',
fields: {
name: {
validators: {
notEmpty: {
message: 'The name is required'
@themodernpk
themodernpk / ajaxCallBack.js
Last active November 1, 2016 20:23
Ajax Call Back
(function (document, window, $) {
'use strict';
var TestModule = {
//--------------------------
funA: function () {
TestModule.handleAjax("http://google.com", {q: "test"}, "GET", "funB");
},
//--------------------------
funB: function (data) {
console.log(data);
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>
<script>
var OneSignal_player_id;
var OneSignal = window.OneSignal || [];
OneSignal.push(["init", {
appId: "<?php echo env('ONESIGNAL_APP_ID') ?>",
autoRegister: true,
notifyButton: {
enable: true
}
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async=""></script>
<script>
var OneSignal_player_id;
var OneSignal = window.OneSignal || [];
OneSignal.push(["init", {
appId: "<?php echo env('ONESIGNAL_APP_ID') ?>",
autoRegister: true,
notifyButton: {
enable: true
}
<?php
namespace Modules\Core\Libraries;
use Modules\Core\Entities\Notifications;
class CoreOneSignal {
//------------------------------------------------\
//------------------------------------------------
@extends('se::layouts.master')
<!---page specific head-->
@section("page_specific_head")
<link rel="stylesheet" href="{{assetsCoreMmenu()}}/examples/css/forms/masks.min.css?v4.0.2">
@endsection
<!--/page specific head-->
<!---page specific footer-->
@section("page_specific_footer")
Vue.http.headers.common['X-CSRF-TOKEN'] = document.querySelector('meta[name=csrf-token]').getAttribute('content');
//#########################Vue#################################################
const app = new VueCommon({
el: '#app',
data: {
urls : [],
practice : {
product_line_id : 2
@themodernpk
themodernpk / cron-job.sh
Created August 21, 2018 18:40
Shell Script Cron Job - Run per 2 seconds - SSH run: "bash cron-job.sh &"
#!/bin/bash
while true
do
/usr/bin/wget wget -O - -q -t 1 https://tempemails.io/cron/per/minute
sleep 2
done
<div class="modal fade example-modal-sm" id="ProjectClientsModal" role="dialog" tabindex="-1"
aria-hidden="true" style="display: none;">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" >Clients</h4>
</div>
//#########################Vue#################################################
const app = new VueCommon({
el: '#app',
data: {
//---------------------Pagination
pagination:{},
current_page: 1,
total_page: null,
per_page: null,