Skip to content

Instantly share code, notes, and snippets.

View paulhuman's full-sized avatar

Paul Human paulhuman

View GitHub Profile
@paulhuman
paulhuman / README.md
Created December 1, 2024 15:07 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@paulhuman
paulhuman / comments.css
Created September 26, 2019 15:34 — forked from davidhund/comments.css
Example of various CSS comment styles
/**
* = MAIN Comment Block
*
* A Main Comment Block for a file. Recognized by the
* 'heavy' bottom border. This comment lives at the top of a file and
* document's its function.
*
* ========================================================================= */
@paulhuman
paulhuman / .bashrc
Created September 3, 2019 13:58 — forked from mathiasverraes/.bashrc
Git shortcuts
#! /bin/sh
alias gs="git status"
alias gc="git commit"
alias gr="git checkout"
alias ga="git add"
alias gl="git lola"
@paulhuman
paulhuman / stars.sh
Created August 27, 2019 08:55 — forked from sebble/stars.sh
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@paulhuman
paulhuman / git-change-commit-messages.md
Created August 25, 2019 12:37 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@paulhuman
paulhuman / markdown.txt
Created March 8, 2017 16:08 — forked from planetoftheweb/markdown.txt
Unformatted Markdown Text
Flexible Layouts with Susy & Breakpoint
Creating layouts for responsive design can be challenging because of the math involved in calculating column widths and gutters, so it’s common for designers to turn to Frameworks and/or Sass to help simplify some of the process. A lot of frameworks are structured around a 12-column grid, but a flexible and responsive grid doesn’t always fit into this structure. In this article, I’m going to show you how to use a coupe of Sass extensions that can help you create truly flexible layout that transcend the 12-column grid.
In this article, I’m going to show you how to use a couple of Sass extensions to tame your layout problems.
The problem
Responsive design for layouts can be tough, because it involves calculating:
@paulhuman
paulhuman / redirect.js
Created March 1, 2017 07:01
Proper redirect js function
var redirect = function(url, time) {
window.setTimeout(function() {
// http://stackoverflow.com/a/506004
window.location.replace(url);
}, time);
};
// redirect('http://жизнь-вечная.рус', 7000);
@paulhuman
paulhuman / gulpfile.js
Created February 25, 2017 16:58
This clones the source, allowing to get to the source stream BEFORE it became the sourcemap
var $ = require('gulp-load-plugins')();
var gulp = require('gulp');
var merge = require('merge-stream');
gulp.task('sass', function() {
var source = gulp.src('./src/scss/index.scss')
.pipe($.sourcemaps.init())
// compile sass into css
.pipe($.sass({ includePaths: './src' }).on('error', $.sass.logError))
// autoprefix css
@paulhuman
paulhuman / gulpfile.js
Created February 25, 2017 16:18
Gulp-sass pipe line with support for neat-burbon, autoprefixer, cleanCss, sourcemaps
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')();
var bourbon = require('node-bourbon').includePaths,
neat = require('node-neat').includePaths;
function getTask(task) {
return require('./gulp/tasks/' + task)(gulp, plugins, site);
}
@paulhuman
paulhuman / gulpfile.js
Created February 25, 2017 16:17 — forked from raminv80/gulpfile.js
Gulp-sass pipe line with support for neat-burbon, autoprefixer, cleanCss, sourcemaps
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')();
var bourbon = require('node-bourbon').includePaths,
neat = require('node-neat').includePaths;
function getTask(task) {
return require('./gulp/tasks/' + task)(gulp, plugins, site);
}