Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View voodoocode's full-sized avatar

ɥɔɐ⅂ ɐɥɔsɐS voodoocode

View GitHub Profile
@ronanguilloux
ronanguilloux / MSWordHtmlCleaners.js
Created June 12, 2012 07:56
2 js solutions to clean nasty MS Word HTML pasted in any CMS + 2 server-side tips
var CleanWordHTML = function ( str )
{
str = str.replace(/<o:p>\s*<\/o:p>/g, "") ;
str = str.replace(/<o:p>.*?<\/o:p>/g, "&nbsp;") ;
str = str.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ;
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ;
str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ;
str = str.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ;
str = str.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;
str = str.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;
@mikefowler
mikefowler / _base.scss
Created August 15, 2012 15:24
Sass Theming Structure
/**
* The result of this file structure is ONE *.css file per theme. Making a global change
* to _base or _config partial will update all themes that inherit from them. #win
*/
@import 'config';
/**
* Global
*/
@kkirsche
kkirsche / Install Composer to use MAMP's PHP.md
Last active January 30, 2024 02:30
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

@jasesmith
jasesmith / atom-vertical-file-tabs.less
Last active December 10, 2020 01:18
For vertically stacked open file tabs, put this in your `./atom/styles.less`
atom-workspace-axis.vertical atom-pane {
flex-direction: row;
.tab-bar:not(:empty) {
box-shadow: inset -1px 0 0 #181a1f;
resize: horizontal;
height: auto;
display: block;
padding-right: 1px;
padding-bottom: 3em;
min-width: 14em;
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\
@fischgeek
fischgeek / resume_template.json
Last active April 26, 2022 00:19
Resume Template as JSON
{
"personal_info": {
"name": "first last",
"age": 0,
"phone": "000-000-0000",
"email": "email@domain.com",
"address": "address",
"website": "https://dev.to"
},
"cv": {