Skip to content

Instantly share code, notes, and snippets.

View mpourismaiel's full-sized avatar
🎯
Focusing

Mahdi Pourismaiel mpourismaiel

🎯
Focusing
View GitHub Profile
@mpourismaiel
mpourismaiel / index.js
Last active August 29, 2018 01:16
Parallax
const parallaxOptions = {
'#hero .logo': {
0: {
top: -120,
'letter-spacing': 1,
opacity: 1,
},
'#skills': {
top: 0,
'letter-spacing': 50,
@mpourismaiel
mpourismaiel / fix-zsh-history.sh
Created January 17, 2018 10:12
Use these three lines to restore zsh_history
mv .zsh_history .zsh_history_bad
strings .zsh_history_bad > .zsh_history
fc -R .zsh_history
@mpourismaiel
mpourismaiel / _truncate
Last active January 17, 2018 10:12
Add ellipsis to the end of a text with CSS
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

Keybase proof

I hereby claim:

  • I am mpourismaiel on github.
  • I am mpourismaiel (https://keybase.io/mpourismaiel) on keybase.
  • I have a public key whose fingerprint is F16A 705A E7DF 1216 8095 6D88 A135 E4A2 2AB0 0607

To claim this, I am signing this object:

function flatten (arr) {
let flattened = []
for (let i = 0; i < arr.length; i++) {
if (Array.isArray(arr[i])) {
flattened = flattened.concat(flatten(arr[i]))
} else {
flattened.push(arr[i])
}
}
@mpourismaiel
mpourismaiel / gulpfile.js
Created September 5, 2016 09:28
Gulpfile for simple html,css,js serving and building
/* eslint-env node */
const gulp = require('gulp')
const del = require('del')
const sass = require('gulp-ruby-sass')
const browserSync = require('browser-sync')
const reload = browserSync.reload
gulp.task('del:css', function () {
return del(['./dest/css/**/*'])
})
@mpourismaiel
mpourismaiel / func.js
Created August 28, 2016 10:04
Argument count matters
const func = {
fns: {},
registerFunction (name, fn) {
if (typeof this.fns[name] === 'undefined') {
this.fns[name] = {}
}
this.fns[name][fn.length] = fn
@mpourismaiel
mpourismaiel / CONTIBUTING.md
Created February 7, 2016 14:28
Sample CONTRIBUTING.md file

How to contribute

First of all, thank you for taking the time to contribute to this project. We've tried to make a stable project and try to fix bugs and add new features continuously. You can help us do more.

Getting started

Check out the roadmap

We have some functionalities in mind and we have issued them and there is a milestone label available on the issue. If there is a bug or a feature that is not listed in the issues page or there is no one assigned to the issue, feel free to fix/add it! Although it's better to discuss it in the issue or create a new issue for it so there is no confilcting code.

Writing some code!