Skip to content

Instantly share code, notes, and snippets.


Diogo Gomes Alphabetus

View GitHub Profile
Alphabetus / minecraft-forge-java8.json
Created Jan 3, 2021
Puffer panel template for minecraft forge
View minecraft-forge-java8.json
"pufferd": {
"type": "java",
"display": "Forge - Java8",
"install": {
"commands": [
"type": "download",
"files": "${version}/forge-${version}-installer.jar"
View gist:d54409060091607dd6350c189108d857
!sub-team <teamId>
!unsub-team <teamId>
!sub-league <leagueId>
!unsub-league <leagueId>
!match-data <matchId>
!team-games <teamId>
!league-matches <leagueId>
!bet <matchId> <bet>
Alphabetus / DemoController.php
Last active Dec 12, 2020
Remote Requests Symfony - Render JS template asynchronously with Twig parameters
View DemoController.php
* @Route("/test.js", name="app.test")
public function test()
$optionalParams = array('foo'=>'bar');
$renderedView = $this->renderView("test.js.twig");
$resp = new Response($renderedView, $optionalParams);
Alphabetus / index.php
Last active Mar 16, 2020
get handlers for Magento Debugging on index.php
View index.php
* Retrieves the handlers used by Magento on frontend.
* Example:
* array(8) { [0]=> string(7) "default" [1]=> string(8) "cms_page" [2]=> string(13) "STORE_default" [3]=> string(29) "THEME_frontend_custom_default" [4]=> string(15) "cms_index_index" [5]=> string(22) "page_two_columns_right" [6]=> string(19) "customer_logged_out" [7]=> string(8) "cms_menu" }
Alphabetus /
Created Feb 20, 2020 — forked from maxivak/
Tree with ancestry. Rails


  • show full path for the item
  • show tree in ol li
  • show tree in dropdown select

Show full path for item

  • one item
View translations.js
var translations = {
// hindi
hindi: {
// story 01
1: [
"मध्यस्थ: एक शाम तेनाली रामा अपनी जॉय फिर तेनाली रामा की पत्नी को देखकर बहुत खुश होकर महल से घर लौटा। वसुधा ने उससे पूछा।",
"पत्नी: क्या तुम आज बहुत खुश नहीं लग रहे हो?",
"रामा: हाँ। क्यों नहीं? मुझे आज खुश क्यों नहीं दिखना चाहिए?",
"पत्नी: क्यों क्या हुआ है?",
"रामा: ओह! वसुधा आज राजा कृष्णदेवराय ने अपने बगीचे में उगाए गए बैंगन से सब्जी बना कर उसे गर्म करने के बाद कढ़ी पर भोज के लिए सभी लोगों को आमंत्रित किया था। मैं वह भूल नहीं पा रहा हूँ।",
View table_for_story.html
<table data-storyid="100" border="0">
<td>Speaker 1:</td>
<td>sentence A.</td>
<td>Speaker 2:</td>
Alphabetus / async_rake.rb
Created Sep 19, 2019 — forked from tompave/async_rake.rb
how to run rake tasks asynchronously from controllers by spawning child processes
View async_rake.rb
class ApplicationController < ActionController::Base
def perform_async(task, options = {})
options[:rails_env] ||= Rails.env
env_vars = { |key, value| "#{key.to_s.upcase}='#{value.to_s}'" }
env_vars_string = env_vars.join(' ')
Process.fork {exec("#{env_vars_string} bin/rake #{task}")}
Alphabetus / redis.rb
Last active Sep 18, 2019 — forked from pubis/redis.rb
Redis config and initialization for rails
View redis.rb
require 'redis'
require 'redis/objects'
REDIS_CONFIG = YAML.load( Rails.root.join("config/redis.yml") ) ).symbolize_keys
dflt = REDIS_CONFIG[:default].symbolize_keys
cnfg = dflt.merge(REDIS_CONFIG[Rails.env.to_sym].symbolize_keys) if REDIS_CONFIG[Rails.env.to_sym]
$redis =
Redis::Objects.redis = $redis
View gist:90f345d9cf810e787ac0501c7db672de
c# DIFF REPORT:# 18-07-2019 11:50:08
# dif number 1
:title: Filter products by collection
:generated_at: 18.18.2019 - 11:50:08
:post_date: July 17, 2019
:tag: Products