Skip to content

Instantly share code, notes, and snippets.

View mkv27's full-sized avatar
🎯
Focusing

Miguel Mendoza mkv27

🎯
Focusing
View GitHub Profile
@mkv27
mkv27 / webpack.config.js
Created March 31, 2016 22:25 — forked from learncodeacademy/webpack.config.js
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"
@mkv27
mkv27 / inread.js
Last active May 26, 2016 20:55
Create code inread
(function($){
var n = $( ".post-full_entry > p" ).length;
var nth = Math.floor(n/2)+1;
var sel = ".post-full_entry > p:eq("+(nth-1)+")";
sel = $(sel);
if(sel.height() == 20){
nth++;
sel = ".post-full_entry > p:eq("+(nth-1)+")";
sel = $(sel);
}
// Use the new media manager to handle uploads to Soliloquy.
$('#soliloquy-area').on('click.soliloquyUpload', '#soliloquy-upload', function(e){
// Prevent the default action from occuring.
e.preventDefault();
// Variable to hold our media applicaton.
var soliloquy_frame;
// If the media frame already exists, reopen it and return.
if ( soliloquy_frame ) {