Skip to content

Instantly share code, notes, and snippets.

View mikoloism's full-sized avatar
💻
@ry 🥇

mikoloism mikoloism

💻
@ry 🥇
View GitHub Profile
@fieldoffice
fieldoffice / default-mixins.scss
Last active August 20, 2021 11:52
Default SASS Mixins
/* MIXINS ___________________________________________*/
// Transitions
@mixin transition($transition-property, $transition-time, $method) {
-webkit-transition: $transition-property $transition-time $method;
-moz-transition: $transition-property $transition-time $method;
-ms-transition: $transition-property $transition-time $method;
transition: $transition-property $transition-time $method;
}
@jimthedev
jimthedev / AudioPlayerDOM.js
Created January 2, 2017 19:56
Audio Player for React DOM with dynamic sources
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
/**
* Use case: audio player with dynamic source in react
*
* Usage:
* <AudioPlayerDOM src={this.state.currentFile}/>
*
* Todo: make a better api, actually pass props through
* Todo: use children instead of passing
@timoxley
timoxley / 1.rreaddir.js
Last active August 6, 2023 17:13
async/await recursive fs readdir
import { join } from 'path'
import { readdir, stat } from 'fs-promise'
async function rreaddir (dir, allFiles = []) {
const files = (await readdir(dir)).map(f => join(dir, f))
allFiles.push(...files)
await Promise.all(files.map(async f => (
(await stat(f)).isDirectory() && rreaddir(f, allFiles)
)))
return allFiles
@bek9
bek9 / font-awesome-colored.css
Last active April 17, 2023 09:48
Identity Colors of Icon in Font Awesome
/*
https://gist.github.com/bek9/10b55a369e8d190e2209
reference: http://brandcolors.net/
*/
.fa-500px.fa-colored { color: #0099e5; }
.fa-amazon.fa-colored { color: #ff9900; }
.fa-android.fa-colored { color: #a4c639; }
.fa-apple.fa-colored { color: #000; }
.fa-bitbucket.fa-colored, .fa-bitbucket-square.fa-colored { color: #205081; }
@maximilian-lindsey
maximilian-lindsey / express_in_electron.md
Last active November 3, 2024 21:30
How to run Express inside an Electron app

How to run Express inside an Electron app

You can run your Express app very easily inside your Electron app.

All you need to do is to:

  • place all the files of your Express app inside a new app folder in your_electron_app\resources\app
  • reconfigure the app.js file
  • refactor some relative pathes in your Express app
@fieldoffice
fieldoffice / sass-transforms
Last active September 27, 2022 17:32
Sass Transform Mixins
// Browser Prefixes
@mixin transform($transforms) {
-webkit-transform: $transforms;
-moz-transform: $transforms;
-ms-transform: $transforms;
transform: $transforms;
}
// Rotate
@mixin rotate ($deg) {
@AlexPashley
AlexPashley / mixins.scss
Created July 5, 2013 14:44
SASS: Mixins for CSS
/* MIXINs */
@mixin transition( $val : ease 0.5s ) {
-webkit-transition: $val;
-moz-transition:$val;
-o-transition:$val;
-ms-transition:$val;
transition:$val;
}
@mixin text-shadow( $top: 3px, $left: 3px, $blur: 3px , $colour: #333 ) {
@paulirish
paulirish / gist:5558557
Last active February 26, 2025 18:07
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa

@oymgc
oymgc / gist:1175262
Created August 27, 2011 11:13
sample gist for my express
/**
* Module dependencies.
*/
var express = require('express');
var app = module.exports = express.createServer();
// Configuration