Skip to content

Instantly share code, notes, and snippets.

View traumverloren's full-sized avatar

Stephanie traumverloren

View GitHub Profile

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone [email protected]:<hash>.git     # or with ssh
@renatorib
renatorib / operator_with_ligatures.md
Last active January 11, 2024 06:45
Using Operator Mono with Fira Code ligatures in Atom.

Using Operator Mono with Fira Code ligatures in Atom.

  1. Open your Atom's Stylesheet
    image

  2. Put this css

atom-text-editor {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
@kriegsman
kriegsman / fadeTowardColor.ino
Created December 11, 2016 22:44
A function for fading one RGB color toward a target RGB color
#include <FastLED.h>
// fadeTowardColor example code.
//
// Sample code that includes a function for fading one RGB color toward a target RGB color
// Also includes a function for fading a whole array of pixels toward a given color
//
// Both of these functions _modify_ the existing color, in place.
//
// All fades are done in RGB color space.
@virajkulkarni14
virajkulkarni14 / Install.md
Last active April 5, 2020 01:58
Installing Cassandra 3.5 on Mac OS X El Capitan

Installing Cassandra on Mac OS X

Caution!

Version Number might change!! The versions of all softwares mentioned here, including Cassandra will change as newer versions are launched.

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@learncodeacademy
learncodeacademy / webpack.config.js
Created January 8, 2016 03:55
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@rpechayr
rpechayr / upgrade.md
Last active August 26, 2016 09:53
Upgrading to Mongoid 5.x

Upgrade to Mongoid 5.x

Mongoid 5 is a major upgrade to Mongoid for several reasons :

Here is a non comprehensive list of things to chexk or upgrade.

  • Mongoid.yml. The driver changes, so the options you pass to mongoid.yml also do. You should generate a brand new one and find the equivalent options you were using. The sessions entry has been replaced by the clients entry.
  • Aggregation. User.collection.aggregate now requires an array as argument, not a variable number of hashes
  • Moped:: classes like Errors or BSON don't exist anymore.
@hubgit
hubgit / polymer-firebase.sh
Last active January 30, 2016 01:35
Create a Polymer application and deploy it to Firebase
#!/bin/bash
mkdir my-app && cd $_
# https://github.com/yeoman/generator-polymer
npm install -g generator-polymer
yo polymer
gulp
@nolanlawson
nolanlawson / protips.js
Last active November 1, 2025 03:20
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@hubgit
hubgit / gulpfile.js
Created March 23, 2015 23:50
Deploy a Polymer app to GitHub Pages using Gulp and node's gh-pages module
// npm install gh-pages --save-dev
var ghpages = require('gh-pages');
gulp.task('deploy', ['default'], function(cb) {
ghpages.publish(path.join(process.cwd(), 'dist'), cb);
});