Skip to content

Instantly share code, notes, and snippets.

View UrvishSSPL's full-sized avatar

Urvish UrvishSSPL

View GitHub Profile
@UrvishSSPL
UrvishSSPL / Select2
Created February 20, 2018 07:05 — forked from dragg/Select2
Vue Components
<template>
<select :name="name" class="form-control">
<slot></slot>
</select>
</template>
<script>
import 'select2-bootstrap-theme/dist/select2-bootstrap.css';
export default {
@UrvishSSPL
UrvishSSPL / select2-vuejs-component.md
Created February 16, 2018 12:41 — forked from craigh411/select2-vuejs-component.md
Vue.js component for Select2

#Vue.js component for Select2

A select2 component for vue.js. Quickly create select2 components, load data via ajax and retrieve selected values and newly created tags.

#Usage

Download and register the component:

Vue.component(
(function($, window, undefined) {
var InfiniteScroll = function() {
this.initialize = function() {
this.setupEvents();
};
this.setupEvents = function() {
$(window).on(
'scroll',
this.handleScroll.bind(this)
@UrvishSSPL
UrvishSSPL / closurize.php
Created June 29, 2017 12:41 — forked from rintaun/closurize.php
closurize(): Converts any valid PHP callable into a Closure. Requires PHP 5.4.0+.
<?php
/**
* Converts any valid PHP callable into a Closure. Requires PHP 5.4.0+.
*
* The ramifications of this are many, but basically it means that any function
* or method can be converted into a Closure, bound to another scope, and
* executed easily. Works properly even with private methods.
*
* - On success, returns a Closure corresponding to the provided callable.
* - If the parameter is not callable, issues an E_USER_WARNING and returns a
@UrvishSSPL
UrvishSSPL / gist:4bc0cb495f99e2649e2cd2e9cfd8774f
Created April 9, 2016 13:59 — forked from kublaios/gist:f01cdf4369c86ddd6d71
Making a PEM File for iOS Push Notifications (From Ray Wenderlich's tutorial)
# Convert the .cer file into a .pem file:
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem
# Convert the private key’s .p12 file into a .pem file:
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem
# Finally, combine the certificate and key into a single .pem file
$ cat PushChatCert.pem PushChatKey.pem > ck.pem
# At this point it’s a good idea to test whether the certificate works.