Skip to content

Instantly share code, notes, and snippets.

View shibulijack-fd's full-sized avatar

Shibu Lijack shibulijack-fd

View GitHub Profile
const Octokit = require("@octokit/rest");
const octokit = Octokit({
auth: "GITHUB_AUTH_TOKEN",
userAgent: "gh-performyard v1.0.0",
baseUrl: "https://api.github.com"
});
const owner = "freshdesk";
const repo = "nucleus";
@shibulijack-fd
shibulijack-fd / email.html
Last active February 12, 2019 13:24
AMP Email
<!--
AMP4EMAIL is an experimental format.
Below is the mininum valid AMP4EMAIL document. Just type away
here and the AMP Validator will re-check your document on the fly.
-->
<!doctype html>
<html ⚡4email>
<head>
<meta charset="utf-8">
@shibulijack-fd
shibulijack-fd / zsh.sh
Last active April 9, 2018 09:24
Zsh Config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=$PATH:/usr/local/mysql/bin
#Path to your oh-my-zsh installation.
export ZSH=/Users/shibulijack/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@shibulijack-fd
shibulijack-fd / hotline.js
Created May 15, 2017 14:30
Hotline Async Embed code
function callHotlineAsync(e,n){var t=document,a="script",c=t.createElement(a),l=t.getElementsByTagName(a)[0];c.src="//"+e,n&&c.addEventListener("load",function(e){n(null,e)},!1),l.parentNode.insertBefore(c,l)}
callHotlineAsync('//chat2.hotline.io/js/widget.js', function() {
window.HotlineWidget.init({
token: "TOKEN_HERE",
host: "https://chat2.hotline.io"
});
});
@shibulijack-fd
shibulijack-fd / google_script.js
Created October 3, 2016 07:25
Google script to convert spreadsheet to YML
function getYAML() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var dest = DocumentApp.openById(PropertiesService.getScriptProperties().getProperty("output_document_id"));
var key = Browser.inputBox("Please enter the key of the Google Spreadsheet containing the content to be generated as a YAML file.");
var source = SpreadsheetApp.openById(key);
var output = "---\nen:\n";
var sheets = source.getSheets();
for (var i = 0; i < sheets.length; i++) {
@shibulijack-fd
shibulijack-fd / translation.gs
Last active April 9, 2020 10:51
Google Apps Script to automate YML generation
// ORIGINAL AUTHOR: MANOJ
function getYAML() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var dest = DocumentApp.openById(PropertiesService.getScriptProperties().getProperty("output_document_id"));
var key = Browser.inputBox("Please enter the key of the Google Spreadsheet containing the content to be generated as a YAML file.");
var source = SpreadsheetApp.openById(key);
var output = "---\nen:\n";
var sheets = source.getSheets();
class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
option :no_fallbacks, false, "Disable I18n fallbacks"
option :langs, nil, "List of langs, will autodiscover by default"
option :lang_map, {}, "Language shortname map"
option :path, "/:locale/", "URL prefix path"
option :templates_dir, "localizable", "Location of templates to be localized"
option :mount_at_root, nil, "Mount a specific language at the root of the site"
option :data, "locales", "The directory holding your locale configurations"
def initialize(app, options_hash={}, &block)
@shibulijack-fd
shibulijack-fd / util.rb
Created November 17, 2015 09:45
Middleman Helper Method Utility [UPDATED]
# Our custom logger
require "middleman-core/logger"
# For instrumenting
require "active_support/notifications"
# Using Thor's indifferent hash access
require "thor"
# Core Pathname library used for traversal
@shibulijack-fd
shibulijack-fd / replace.sh
Created August 6, 2015 05:38
One liner to replace text in a folder
find ~/Projects/Personal/wordpress -type f -iname '*.html' -exec sed -i.bak 's#http://localhost/wordpress#http://freshdesk.com#g' "{}" +