Skip to content

Instantly share code, notes, and snippets.

View stephenajulu's full-sized avatar
👋
Hello!

Stephen Ajulu stephenajulu

👋
Hello!
View GitHub Profile
@stephenajulu
stephenajulu / cloudSettings
Last active February 5, 2021 18:13 — forked from hofmannsven/README.md
MySQL CLI Cheatsheet
{"lastUpload":"2021-02-05T18:12:49.466Z","extensionVersion":"v3.4.3"}
@stephenajulu
stephenajulu / spree-commerce.md
Created October 5, 2019 15:56 — forked from basiszwo/spree-commerce.md
Spree Commerce Resources
@stephenajulu
stephenajulu / jeykll-post-counter.liquid
Created November 4, 2019 05:58 — forked from Phlow/jeykll-post-counter.liquid
Counter: This code snippet just counts your jekyll posts and spits out the result
{% comment %}
*
* Counter: This include counts your jekyll posts
*
{% endcomment %}{% assign counter = 0 %}{% for item in site.posts %}{% unless item.published == false %}{% assign counter=counter | plus:1 %}{% endunless %}{% endfor %}{{ counter }}
@stephenajulu
stephenajulu / terminal-with-powerline.sh
Created November 21, 2019 17:50 — forked from lirantal/terminal-with-powerline.sh
Hyper terminal + Powerline 9k terminal theme for oh-my-zsh
# Use hyper.is or iTerm2 as terminal emulators
# Install ohmyzsh
# https://github.com/robbyrussell/oh-my-zsh
# Copy over configs from ~/.bash_profile
# For example, it may have the nvm setup or any aliases like exa=ls and cat=bat
# ~/.hyper.js configuration:
copyOnSelect: true
@stephenajulu
stephenajulu / profiles.json
Created February 23, 2020 10:32 — forked from kasuken/profiles.json
Windows Terminal settings and files
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
function encrypt(text){
var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq')
var crypted = cipher.update(text,'utf8','hex')
crypted += cipher.final('hex');
return crypted;
}
function decrypt(text){
var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq')
var dec = decipher.update(text,'hex','utf8')
@stephenajulu
stephenajulu / web-share.js
Created April 22, 2020 09:18 — forked from deanhume/web-share.js
Web Share API example
var shareButton = document.getElementById('shareThis');
var supported = document.getElementById('support');
// Listen for any clicks
shareButton.addEventListener('click', function (ev) {
// Check if the current browser supports the Web Share API
if (navigator.share !== undefined) {
// Get the canonical URL from the link tag
var shareUrl = document.querySelector('link[rel=canonical]') ? document.querySelector('link[rel=canonical]').href : window.location.href;
@stephenajulu
stephenajulu / offline-notification.js
Created April 22, 2020 09:44 — forked from deanhume/offline-notification.js
Offline toast notifications
function showOfflineNotification() {
if ('serviceWorker' in navigator) {
// Open the cache and check if we have this page saved
caches.open('beer-data').then(function(cache) {
var urlToCheck = 'https://deanhume.github.io/beer' + createStyleUrl(styleId, pageId, false);
cache.match(urlToCheck)
.then(function(response) {
if (response == undefined){ return; } // return if we found nothing
// We found the resource in cache
if (response.ok && localStorage.getItem(urlToCheck) === null) {
@stephenajulu
stephenajulu / offline-ga.js
Created April 22, 2020 09:44 — forked from deanhume/offline-ga.js
Offline Google Analytics
importScripts('path/to/offline-google-analytics-import.js');
goog.offlineGoogleAnalytics.initialize();
// Implement any other service worker caching strategies appropriate for your web app.