The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
| $win_user = "ipc" | |
| $linux_user = "ipc" | |
| $package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc" | |
| $base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs" | |
| $dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin") | |
| $dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") } | |
| Add-MpPreference -ExclusionPath $base_path |
| 'use strict'; | |
| class HTMLElementPlus extends HTMLElement { | |
| static defaultAttributeValue() { | |
| /* the name of the attribute is parsed in as a parameter */ | |
| return; | |
| } | |
| static parseAttributeValue(name, value) { |
| function transformSourceFile(sourceText: string, transformers: ts.TransformerFactory<ts.SourceFile>[]) { | |
| const transformed = ts.transform(ts.createSourceFile('source.ts', sourceText, ts.ScriptTarget.ES2015), transformers); | |
| const printer = ts.createPrinter({ newLine: ts.NewLineKind.CarriageReturnLineFeed }, { | |
| onEmitNode: transformed.emitNodeWithNotification, | |
| substituteNode: transformed.substituteNode | |
| }); | |
| const result = printer.printBundle(ts.createBundle(transformed.transformed)); | |
| transformed.dispose(); | |
| return result; | |
| } |
| /** @jsx h */ | |
| // You only need custom elements for this!!! | |
| import 'skatejs-web-components/src/native-shim'; | |
| import { Component, define, h, prop } from 'skatejs'; | |
| import ShadowNode, { scopeCss, scopeTree } from './shadow-node'; | |
| // Converts real DOM nodes into Incremental DOM nodes. | |
| // | |
| // This is orthogonal to this gist, but makes it so we can distribute real |
| #!/usr/bin/env ruby | |
| # Modified from https://gist.github.com/robinsloan/3688616 | |
| # This version will nuke your entire twitter history past a certain threshold. | |
| # It requires you to download your archive from twitter and put "tweets.csv" | |
| # in the same directory as this script. | |
| require 'rubygems' | |
| require 'twitter' | |
| require 'json' | |
| require 'faraday' | |
| require 'csv' |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
Several developers asked me about how difficult it will be to migrate Angular 1 to Angular 2. Angular 2 isn't done, so I legitimately have no idea how hard it will be. But there are a few high-level guiding principals in the design of Angular 1 that make adapting to changes like this fairly painless.
Angular 1 was designed so it would have a fairly minimal API surface. Let's look at controllers, since these are the meat of your app. Controllers are just functions that get passed other components as arguments:
MyController ($scope) {
$scope.list = [];
$scope.addItem = function (name) {
$scope.list.push({| grunt.initConfig({ | |
| aws: grunt.file.readJSON('aws-keys.json'), // Read the file | |
| compress: { | |
| assets: { | |
| options: { | |
| mode: 'gzip' | |
| }, | |
| }, | |
| files: [ |
| require "rubygems" | |
| require "twitter" | |
| require "json" | |
| # things you must configure | |
| TWITTER_USER = "your_username" | |
| MAX_AGE_IN_DAYS = 1 # anything older than this is deleted | |
| # get these from dev.twitter.com | |
| CONSUMER_KEY = "your_consumer_key" |
| (function(XHR) { | |
| "use strict"; | |
| var stats = []; | |
| var timeoutId = null; | |
| var open = XHR.prototype.open; | |
| var send = XHR.prototype.send; | |