Skip to content

Instantly share code, notes, and snippets.

Tarek Khalil khalilovcmd

Block or report user

Report or block khalilovcmd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View enhanced_processor.rb
module Rendering
module Slack
module Processors
class EnhancedProcessor < ::SlackMarkdown::Processor
def filters
@filters ||= [
View message.json
"attachments": [
"color": "#36a64f",
"pretext": "Some pretext",
"author_name": "Jasmine Jaume",
"text": "Some text",
"image_url": ""
View nokogiri_parsing.rb
document = ::Nokogiri::HTML::fragment(text)"h1,h2,h3").each do |header|
View note.rb
module Rendering
module Parts
class Note < Reply
include ::Services::Slack::Rendering::Mixins::TeammateAuthor
def attachment_color
def fallback
View part_renderer.rb
class PartRenderer < Renderer
"note" => ::Services::Slack::Rendering::Parts::Note,
def render(context)
View message_renderer.rb
module Rendering
class MessageRenderer
class SlackMessage; end
class SlackAttachment; end
class SlackAttachmentField; end
class SlackAttachmentAction; end
def initialize(context =
khalilovcmd / logger.js
Last active Jul 8, 2019 — forked from rtgibbons/logger.js
Logger Library with winston
View logger.js
var winston = require('winston');
var fs = require('fs');
// check if directory exist
if (!fs.existsSync('logs')) {
fs.mkdirSync('logs'); // create new directory
// Set up logger
var customColors = {
khalilovcmd / lodashify.js
Created Dec 19, 2015
to import lodash into chrome dev tools console
View lodashify.js
var el = document.createElement('script');
el.src = "";
el.type = "text/javascript";
khalilovcmd /
Last active Dec 16, 2015
installing server density redis plugin on a linux machine (server density agent version 1)
# download sd-agent v1.4.1, then run .sh
chmod +x
./ -a xxxxxxx -k xxxxxxxxxxxxxxxxxxxxxxxxxxx
# python and pip need to be installed
pip install redis
# edit sd-agent config file
vi /etc/sd-agent/config.cfg
khalilovcmd /
Last active Dec 9, 2015
installing heroku, and getting started
# download heroku
wget -O- | sh
# login to heroku
heroku login
# create heroku-git link (adding a heroku remote)
heroku create
# pushing a commit to heroku
You can’t perform that action at this time.