This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import path from 'path'; | |
const folder = `${path.resolve()}/`; | |
const scriptName = 'indexMaker.js'; | |
console.log(folder); | |
console.log(scriptName); | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let arr = Array.from(document.querySelectorAll('.File__Button')); | |
console.log(arr.length); | |
(function loopClick (i) { | |
setTimeout(function () { | |
console.log('loop i', i) | |
if(arr[i - 1]){ | |
arr[i - 1].click() | |
arr = Array.from(document.querySelectorAll('.File__Button')); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hel-LO. No. I have no feminist things in New York, which is a horrifying place I love fully, but here are some things you will find engaging! | |
1. You should find a Donut Plant and eat a coconut cream donut, unless you hate coconut so much you really can't cope. If you can drink coconut _water_ even, these are great. All their donuts are great. Oatmeal is the other best. | |
2. I don't know where you're staying, but if you wanna feel fancy, go to Freeman's Bar http://www.freemansrestaurant.com/. | |
3. I don't know if you like shoes, but Trippen, the weird German shoe company with the amazing boots, has a location in Soho. I love them, they cost more than ETH. | |
4. Prospect Park zoo is beautiful but it's also a zoo! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOW 2 GREP SOMETHING | |
find /etc /home /var /tmp -type f -exec grep -q 'helloiamstring' '{}' ';' -print | |
find / -not -path '/tmp/*' …rest of predicates… | |
find / -type f -exec grep 'helloiamstring' '{}' '+' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bringing machine 'default' up with 'virtualbox' provider... | |
==> default: Running provisioner: shell... | |
default: Running: /var/folders/rj/00wvz12s67727s2kty1w5dy80000gp/T/vagrant-shell20180202-46524-hf0r7s.sh | |
default: Ign http://us.archive.ubuntu.com precise InRelease | |
default: Hit http://us.archive.ubuntu.com precise-updates InRelease | |
default: Hit http://us.archive.ubuntu.com precise-backports InRelease | |
default: Hit http://us.archive.ubuntu.com precise Release.gpg | |
default: Ign http://ppa.launchpad.net precise InRelease | |
default: Hit http://security.ubuntu.com precise-security InRelease | |
default: Hit http://us.archive.ubuntu.com precise-updates/main Sources |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// db.js | |
'use strict'; | |
var mongoose = require('mongoose'); | |
var db = mongoose.createConnection('mongodb://127.0.0.1:27017/YOUR_APP_NAME'); | |
var auth_db = db.useDb('users'); | |
module.exports = {auth: auth_db, db: db}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parent.findById(req.params._id).populate('children').exec(function(err, doc){ | |
// note that you have to populate the children here | |
// or they won't turn up properly later | |
// even if you substitute all of them with a new document set. | |
Child.find({'_parent':req.params._id}).populate('grandchildren').exec(function(err, docs){ | |
// note that the child has to know it belongs to the parent in its own schema | |
// this is technically a totally separate document set. | |
if(err) res.send(err); | |
Child.populate(docs, {path: 'grandchildren.greatGrandChildren', model:'GreatGrandChild'}, function(err, data){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet | |
version="1.0" | |
exclude-result-prefixes="x xsl cmswrt cbq" | |
xmlns:x="http://www.w3.org/2001/XMLSchema" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:cmswrt="http://schemas.microsoft.com/WebPart/v3/Publishing/runtime" | |
xmlns:cbq="urn:schemas-microsoft-com:ContentByQueryWebPart"> | |
<xsl:output method="xml" indent="no" media-type="text/html" omit-xml-declaration="yes"/> | |
<xsl:param name="cbq_isgrouping" /> | |
<xsl:param name="cbq_columnwidth" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// HERE IS YOUR CSS | |
/* TOC webpart style */ | |
.level-section-header { | |
font-size: 14px; font-weight:bold;margin:5px; | |
} | |
.level-section-fresh{ /* .level-section is set inline in TOC pages, so .level-section-fresh is a new class added to LevelStyle.xsl VerticalBullet (custom) to bypass */ | |
margin:1px 0px 0px 15px; | |
border-style: none; | |
border-color: inherit; |
NewerOlder