Skip to content

Instantly share code, notes, and snippets.

@Miniwe
Miniwe / text-inner-shadow.css
Created November 4, 2012 21:37
Inner Text Shadow
/**
* A "deeper" indented text effect with the :before and :after pseudo-elements.
*/
html, body {
height: 100%;
}
body {
margin: 0;
@Miniwe
Miniwe / gist:4078305
Created November 15, 2012 12:00 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
.select2-container .select2-choice {
border: 2px solid #dce4ec;
font-family: "Lato", sans-serif;
font-size: 14px;
text-indent: 1px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
@Miniwe
Miniwe / gist:18a62b00f3cd94dee993
Created April 22, 2015 16:08
Mongoose find by _id
var ObjectId = require('mongoose').Types.ObjectId;
var objId = new ObjectId( (param.length < 12) ? "123456789012" : param );
// You should make string 'param' as ObjectId type. To avoid exception,
// the 'param' must consist of more than 12 characters.
User.find( { $or:[ {'_id':objId}, {'name':param}, {'nickname':param} ]},
function(err,docs){
if(!err) res.send(docs);
});
@Miniwe
Miniwe / ultimate-ut-cheat-sheet.md
Created July 26, 2016 08:57 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@Miniwe
Miniwe / index.js
Last active March 23, 2018 23:02
webpack.config.js
import '../scss/index.scss';
@Miniwe
Miniwe / macros.vba
Created January 14, 2019 09:55
копирование выделенных ячеек в отдельный лист
Sub SelectActualUsedRange()
Dim FirstCell As Range, LastCell As Range
Set LastCell = Cells(Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).row, _
Cells.Find(What:="*", SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Column)
Set FirstCell = Cells(Cells.Find(What:="*", After:=LastCell, SearchOrder:=xlRows, _
SearchDirection:=xlNext, LookIn:=xlValues).row, _
Cells.Find(What:="*", After:=LastCell, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, LookIn:=xlValues).Column)
@Miniwe
Miniwe / gist:95f081dfb72b6667c3420e658c8ba3c2
Created August 19, 2019 14:26 — forked from dotcomputercraft/gist:b7283bd52f4b5389e748
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
the best way (I've found) to completely uninstall node + npm is to do the following:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm
@Miniwe
Miniwe / docevoli.js
Last active September 30, 2021 13:32
const str = 'i love codewars'
// s rawe docevoli
function reverse (str) {
let res = ''
const spaces = [];
Array.from(str).forEach((item, index) => {
if (item === ' ') {
spaces.push(index)
}