Skip to content

Instantly share code, notes, and snippets.

@s4l4x
s4l4x / git.sh
Created April 17, 2020 06:55
git cleanup
git reset --hard HEAD; git clean -df
@s4l4x
s4l4x / strings.js
Last active March 31, 2020 06:04
[Join Strings (with Delimeter)] Join n strings with a delimeter iff n > 1
{[item1, item2].filter(Boolean).join(', ')}
@s4l4x
s4l4x / Dates.js
Last active September 5, 2018 06:46
[Date] Usage of the Date object
## randomDateInRange
randomDateInRange(start, end) {
return new Date(
start.getTime() + Math.random() * (end.getTime() - start.getTime())
);
}
randomDateInRange(new Date(2018, 0, 1), new Date(2018, 3, 1)).toLocaleDateString();
randomDateAfterDate(start, days) {
return new Date(
@s4l4x
s4l4x / python_resources.md
Last active August 29, 2015 14:21 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides

@s4l4x
s4l4x / css_resources.md
Last active August 29, 2015 14:21 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides