Skip to content

Instantly share code, notes, and snippets.

View dsemenovsky's full-sized avatar
🎯
Focusing

Dmitry Semenovsky dsemenovsky

🎯
Focusing
View GitHub Profile
@garth
garth / CurvedText.js
Created December 22, 2017 10:41
React component for making curved text
/*
Draws text around a circule (the object).
Text is centered at the top of the circle.
Depends on styled-components, but can be adapted for other frameworks.
<CurvedText
text="I'm curved"
// npm install --save scrollreveal or install like you're used to doing it.
// It doesn't work well if there are multiple instances of ScrollReveal,
// so we have to create a module returning an instance:
// file ScrollReveal.js:
import ScrollReveal from 'scrollreveal'
export default ScrollReveal()
// Then in a component:
import React from 'react'
import sr from './ScrollReveal'
@ghinda
ghinda / git-commit-csv-export.sh
Last active October 17, 2023 10:16
git csv export of commits in the last month
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv
@flaub
flaub / SqliteContext.cs
Created March 16, 2015 08:21
SQLite EF 6 Database Initializer
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.SQLite;
using System.Linq;
namespace SQliteEF6
{
class SqliteContext : DbContext
@ingdir
ingdir / gist:0b211b9253c376f9cfa5
Last active December 3, 2023 11:47
BEM Cheatsheet

BEM Cheatsheet

BLOCK

Block encapsulates a standalone entity that is meaningful on its own.

While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.

Holistic entities without DOM representation (such as controllers or models) can be blocks as well.

class ContactForm
@to = "Jason Seifer <jason@twistedmind.com>"
include ActiveModel::AttributeMethods
include ActiveModel::Validations
include ActiveModel::Conversion
extend ActiveModel::Translation
extend ActiveModel::Callbacks
attr_accessor :name, :email, :message