Skip to content

Instantly share code, notes, and snippets.

View dskrepps's full-sized avatar
💭
Javascripting

Dylan Krepps dskrepps

💭
Javascripting
View GitHub Profile
@tkrotoff
tkrotoff / CSSFrameworks.md
Last active March 18, 2024 04:26
CSS Frameworks (Bootstrap, Tailwind CSS, Bulma, React Bootstrap, Chakra UI, Ant Design)

The right question is: is there added value in reinventing the wheel? (button, form controls, badge, card, spinner, modal...). The existing wheels will probably ride better than yours.

I would go with vanilla Bootstrap (just the Sass part, not the JS part).

Bootstrap

Bootstrap CSS utilities are very nice: same principles as Tailwind CSS.

@janjongboom
janjongboom / vscode.js
Last active January 5, 2023 07:30
Cloud9 IDE keybindings for Visual Studio Code
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+e",
"command": "workbench.action.quickOpen"
},
{
"key": "shift+cmd+e",
"command": "workbench.action.gotoSymbol"
},
@branneman
branneman / app.js
Last active February 5, 2021 21:58
Node.js application entry-point files
#!/usr/bin/env node
'use strict';
var spawn = require('child_process').spawn;
var args = [
'--harmony',
'app/bootstrap.js'
];
@branneman
branneman / better-nodejs-require-paths.md
Last active June 29, 2024 16:00
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@willurd
willurd / web-servers.md
Last active July 21, 2024 18:52
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@johnholdun
johnholdun / imgur-bookmarklet.js
Created April 9, 2011 22:43
Bookmarklet for uploading the image currently loaded in your browser to imgur
// that is, navigate to the direct URL for an image hosted on the world wide web, then >>>INVOKE<<<
// i wanted the bookmarklet to redirect to the new direct image URL but that was out of scope!
javascript:void(window.location="http://api.imgur.com/2/upload.json?url="+encodeURIComponent(window.location.href));