Skip to content

Instantly share code, notes, and snippets.

View David-Melo's full-sized avatar
🖥️
Coding Towards The Singularity

David Melo David-Melo

🖥️
Coding Towards The Singularity
View GitHub Profile
@jareware
jareware / SCSS.md
Last active July 1, 2024 09:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@IskenHuang
IskenHuang / local.js
Created October 10, 2013 15:37
sails.js deploy to openshift setup
module.exports = {
host: process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1',
// port: process.env.PORT || 1337,
port: process.env.OPENSHIFT_NODEJS_PORT || 80,
// environment: process.env.NODE_ENV || 'development'
// environment: process.env.NODE_ENV || 'production'
environment: process.env.NODE_ENV || 'development'
@mikermcneil
mikermcneil / sails_godaddy_ca_ssl_example.js
Created November 14, 2013 03:24
/** * An example of how to use a CA certificate in your Sails app. * * Would love to see support for the `ca` key on the main ssl config object * (if you write it up, please just send the PR to the associations branch so it's easier to merge-- thanks!) */
/**
* An example of how to use a CA certificate in your Sails app.
*
* Would love to see support for the `ca` key on the main ssl config object
* (if you write it up, please just send the PR to the associations branch so it's easier to merge-- thanks!)
*/
var fs = require('fs');
@tschaub
tschaub / AngularStyle.md
Last active December 20, 2016 15:28
Opinionated whitespace guide for AngularJS modules

AngularJS Whitespace Guide

The purpose of this style guide is to suggest formatting conventions for AngularJS modules that result in readible, maintainable, and lint free code (see the linter configurations for JSHint and gjslint.py.

All-in-one example

Typically, an AngularJS application would be structured with many modules in separate files. The example below shows a monolithic module to illustrate the formatting conventions for various module methods.

angular.module('module.name', [
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 22, 2024 22:13
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@lelandrichardson
lelandrichardson / ko-convenience.js
Created March 5, 2014 01:11
Knockout.js Custom Utility Bindings
(function (ko, handlers, unwrap, extend) {
"use strict";
extend(handlers, {
href: {
update: function (element, valueAccessor) {
handlers.attr.update(element, function () {
return { href: valueAccessor() };
});
}
},
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@taras-d
taras-d / react-native-on-vs-emulator-and-win10.md
Last active September 1, 2021 08:20
React native on VS Emulator and Windows 10
@richbai90
richbai90 / PageA.jsx
Last active January 12, 2020 01:30
Next.js + ApolloClient + ApolloLinkState
import Paper from "@material-ui/core/Paper";
import { withStyles } from "@material-ui/core/styles";
import { graphql } from "react-apollo";
import { compose } from 'recompose';
import getTree from './queries/getTree';
import styles from './styles';
const Canvas = ({
classes,
// activeItem,
@stevecastaneda
stevecastaneda / Example.tsx
Created July 16, 2020 00:49
A Tailwind-ready Modal using React Aria from Adobe
import React, { useState, useContext, useRef } from "react";
import { useOverlayTriggerState } from "@react-stately/overlays";
import { useButton } from "@react-aria/button";
import { Modal } from "components/overlays/Modal";
export function Example() {
let state = useOverlayTriggerState({});
function onOpen() {
state.open();