Skip to content

Instantly share code, notes, and snippets.

View andreimoment's full-sized avatar

Andrei Andreev andreimoment

View GitHub Profile
@andreimoment
andreimoment / hello.vue
Created June 23, 2020 21:42 — forked from ryenski/hello.vue
Stimulus.js + Vue.js
<template>
<div id="app">
<p>{{ message }}</p>
</div>
</template>
<script>
export default {
data: function () {
return {
// settings and supporting mixins for scss projects
$breakpoints: (
watch: 42mm,
phone-p: 375px,
phone-l: 630px,
tablet-p: 740px,
tablet: 900px,
tablet-l: 1023px,
mobile: 740px,
@andreimoment
andreimoment / parse-IIS-Log.cmd
Created January 8, 2019 20:30 — forked from GuyHarwood/parse-IIS-Log.cmd
parse raw IIS logs using MS Log Parser into csv file
logparser -i:W3C -o:csv "SELECT * INTO c:\temp\results.csv FROM c:\temp\myLogFile.log"
@andreimoment
andreimoment / gist:59710a5b11b44c640a60083007cdd7fb
Created September 28, 2018 23:22 — forked from Aupajo/gist:4654510
List of TZInfo timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@andreimoment
andreimoment / offices.yml
Created July 5, 2018 22:09
HL Offices -- please confirm info
locales:
america:
placeholder: |
<h3>Houlihan Lokey is headquartered in Los Angeles with offices worldwide</h3>
cities:
- atlanta
- chicago
- dallas
- houston
- los_angeles
@andreimoment
andreimoment / custom_helpers.rb
Last active February 21, 2018 21:04
Adds a vimeo_thumbnail helper to Middleman
# Adds a vimeo_thumbnail(vimeo_id, size) helper to Middleman
#
# by Andrei Andreev / github.com/andreimoment, 2018
#
# to install:
# - save the content of this gist to lib/custom_helpers.rb
# (you may need to create the lib folder and the custom_helpers.rb file)
#
# - add these two lines to config.rb:
# require 'lib/custom_helpers'
@andreimoment
andreimoment / customize_error.rb
Last active July 18, 2020 13:54 — forked from telwell/customize_error.rb
Customize Field Errors with Rails 5 and Bootstrap
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
html = ''
form_fields = %w(textarea input select)
tag_elements = Nokogiri::HTML::DocumentFragment.parse(html_tag).css "label, " + form_fields.join(', ')
tag_elements.each do |e|
if e.node_name.eql? 'label'
html = %(#{e}).html_safe
elsif form_fields.include? e.node_name
@andreimoment
andreimoment / sample.md
Created April 14, 2017 20:05
markdown sample

Mission Title Mission Subtitle

Here's the first paragraph introducing the mission.

  1. First step
  2. Second Step
  3. Third step

And some tips:

@andreimoment
andreimoment / application.rb
Created January 22, 2016 21:00
Ernie Miller's recommendation for application.rb
# config/application.rb
# published at https://ernie.io/2015/06/16/rails-application-rb-recommendations/
config.generators do |g|
g.assets = false # stop creating empty asset files for every controller you generate
g.helper = false # stop creating empty helper files
end
config.action_controller.include_all_helpers = false # only include this controller's helpers, do not include all others
config.active_record.schema_format = :sql # prevent loss of clarity caused by the lossy schema format

Custom Twitter Stylesheet

Craig Mod does a bigger overhaul with Twitter for Minimalists, but this will only do the following:

  • Hides promoted tweets and trends
  • Hides the useless “Expand” link that appears under every tweet
  • Tones down the blue conversation line to a barely-visible gray
  • Hides all numbers

You can add this CSS in Safari with this extension. The URL to target is twitter.com/*.