Skip to content

Instantly share code, notes, and snippets.

View BroFox86's full-sized avatar

Daur Gamisonia BroFox86

View GitHub Profile
@pksunkara
pksunkara / config
Last active July 25, 2024 15:53
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@kevinSuttle
kevinSuttle / meta-tags.md
Last active July 10, 2024 09:39 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@snowman-repos
snowman-repos / gist:3838104
Created October 5, 2012 04:31
SASS: Font Stack
@mixin font-stack-brand {
font-family: 'Gotham Rounded A', 'Gotham Rounded B', "proxima-nova-soft", sans-serif;
}
@mixin font-stack-headers {
font-family: 'Whitney Cond A', 'Whitney Cond B', "ronnia-condensed", sans-serif;
font-weight: 700;
font-style: normal;
}
@mixin font-stack-body {
font-family: 'Whitney SSm A', 'Whitney SSm B', "ff-meta-web-pro", sans-serif;
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@ricardozea
ricardozea / Smooth scroll to top of page.markdown
Last active May 12, 2024 12:12
Smooth scroll to top of page

Visit the new improved script here! Smooth scroll to top of page (Improved!)


Smooth scroll to top of page (Legacy!)

If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.

  1. Add an id of "top" to the <body> tag. Like this: <body id="top">
  2. Add the onclick function to the link. Like this: <a href="#top" onclick="scrollToTop(); return false">Back to Top ↑</a>
@tjFogarty
tjFogarty / penthouse-gulp.js
Created September 19, 2014 11:54
Penthouse - gulp
var penthouse = require('penthouse');
var fs = require('fs');
var cleanCSS = require('clean-css');
gulp.task('penthouse', ['styles'], function () {
penthouse({
url: ['http://chadwicks.dev'],
css: 'assets/css/application.css',
width: 480,
height: 800
@unbracketed
unbracketed / branch-fu.md
Created April 7, 2015 17:49
Moving commits between branches

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y
var defaultTitle = document.title;
// subscribe to visibility change events
document.addEventListener('visibilitychange', function () {
// fires when user switches tabs, apps, goes to homescreen, etc.
if (document.visibilityState === 'hidden') {
document.title = 'Baby, Come Back!'
}
// fires when app transitions from prerender, user returns to the app / tab.
if (document.visibilityState === 'visible') {
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
'use strict';
// Требует node.js и пакета mkdirp
// Пакет mkdirp: https://www.npmjs.com/package/mkdirp#install — установить глобально или прописать установку в package.json, в секции devDependencies
// Использование:
// - поместить этот файл в корень проекта
// - исправить пути к генерируемым папкам и файлам, если блоки проекта лежат не в ./src/blocks/
// - в терминале, будучи в корневой папке проекта, выполнить node createBlock.js [имя блока] [доп. расширения через пробел]
const fs = require('fs'); // будем работать с файловой системой