Skip to content

Instantly share code, notes, and snippets.

View joashp's full-sized avatar
🍍
I might be slow to respond at times.

Joash joashp

🍍
I might be slow to respond at times.
View GitHub Profile
@joashp
joashp / neon.css
Created February 12, 2016 06:44
Neon Text Effects with CSS3
View neon.css
body {
background-color:#424242;
}
.neon-effect {
text-align:center;
font-size:40px;
margin:20px 0 20px 0;
color:#ffffff;
text-shadow: 0 0 10px #ffffff,
@joashp
joashp / make_api_calls_php.php
Last active October 28, 2021 12:12
Make API Calls in PHP
View make_api_calls_php.php
<?php
function CallAPI($method, $url, $data = false) {
$curl = curl_init();
switch ($method)
{
case "POST":
curl_setopt($curl, CURLOPT_POST, 1);
@joashp
joashp / Profile Cards Flip View.markdown
Created October 18, 2015 06:03
Profile Cards Flip View
@joashp
joashp / openssl_encrypt_decrypt.php
Created September 4, 2015 15:59
Simple PHP encrypt and decrypt using OpenSSL
View openssl_encrypt_decrypt.php
<?php
/**
* simple method to encrypt or decrypt a plain text string
* initialization vector(IV) has to be the same when encrypting and decrypting
*
* @param string $action: can be 'encrypt' or 'decrypt'
* @param string $string: string to encrypt or decrypt
*
* @return string
*/
@joashp
joashp / PushNotifications.php
Last active July 28, 2023 12:33
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
View PushNotifications.php
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";