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
| const { xml2json, json2xml } = require('xml-js'); | |
| const { readFileSync, writeFileSync } = require('fs'); | |
| const postIds = require('./postIds').map(id => Number(id)); | |
| const xml = JSON.parse(xml2json(readFileSync('./export.xml'))); | |
| const comments = xml.elements.filter(element => element.type === 'comment'); | |
| const rss = xml.elements.find(element => element.name === 'rss'); | |
| const channel = rss.elements.find(element => element.name === 'channel'); | |
| const nonItems = channel.elements.filter(element => element.name !== 'item'); |
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
| // Convert to a bookmarklet at https://mrcoles.com/bookmarklet/ | |
| [...document.querySelectorAll('[data-id] a:not([aria-label])')] | |
| .filter(el => el.href.includes('/c4eo/align-rails/pull/')) | |
| .forEach(el => { | |
| const tickets = el.innerText.split(']').join(' ').split('[').join(' ').split(',').join(' ').split(' ').filter(str => str[0] === '#'); | |
| const ticketEls = tickets.map(ticket => ` | |
| <a class="d-inline-block IssueLabel v-align-text-top labelstyle-de752c linked-labelstyle-de752c" style="background-color: #de752c; color: #ffffff; margin-right: 4px" title="${ticket}" href="https://www.pivotaltracker.com/n/projects/1519937/stories/${ticket.slice(1)}" target="_blank">${ticket}</a> | |
| `); | |
| el.parentNode.insertAdjacentHTML('beforeend', `<span class="labels lh-default">${ticketEls.join('')}</span>`); | |
| }); |
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
| using System; | |
| using System.Threading; | |
| using SimpleHttp; | |
| using System.IO; | |
| using System.Linq; | |
| using Microsoft.Data.Sqlite; | |
| using System.Collections.Generic; | |
| namespace WebServer | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace Checkers | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| namespace RainForest { | |
| class Program { | |
| static void Main (string[] args) { | |
| Company rainforest = new Company ("Rainforest, LLC"); | |
| string[] cities = new string[] { "Austin", "Houston", "Dallas", "San Antonio" }; | |
| string[] items = new string[] { "Banana", "Toothpaste", "Baseball", "Laptop" }; |
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
| using System; | |
| using System.Collections.Generic; | |
| namespace Mastermind { | |
| class Program { | |
| static void Main (string[] args) { | |
| Game game = new Game (new string[] { "a", "b", "c", "d" }); | |
| for (int turns = 10; turns > 0; turns--) { | |
| Console.WriteLine($"You have {turns} tries left"); | |
| Console.WriteLine ("Choose four letters: "); |
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
| find ./_images/* | | |
| awk -F/ '{print $NF}' | | |
| sort -u > ./tmp/images.txt && | |
| grep -IhFriof ./tmp/images.txt --exclude-dir=".git" . | | |
| awk '{print $0}' | sort -u | comm -23 ./tmp/images.txt - |
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
| aws s3 sync ~/Documents/uploads/ s3://rcrwireless.com/wp-content/uploads |
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
| # This files lives at /MAMP/conf | |
| [mysqld] | |
| max_allowed_packet = 100M |
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
| $blue: #0026FF; | |
| $red: #FF0000; | |
| $yellow: #F2FF00; | |
| $colors: ( | |
| blue: $blue, | |
| red: $red, | |
| yellow: $yellow | |
| ); |