I published this email exchange as a full post at csswizardry.com/…/can-css-be-too-modular.
This file contains 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
# A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis) | |
# Check our Studio: https://gentlenode.com/ | |
# Iron Router > Configuration | |
Router.configure | |
layoutTemplate: 'Main' | |
loadingTemplate: 'Loading' |
This file contains 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 is a Rails helper for generating a single chart for a column from a data set. | |
# blood_tests is the data set, and column_name is the column from the set to use. | |
# It calls generate_chart_row for each record, passing the column_name argument. | |
# It also does some stuff with vertical axis labels and chart options. | |
def generateChart(blood_tests, column_name) | |
data_table = GoogleVisualr::DataTable.new |
This file contains 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 ApolloClient, { createNetworkInterface } from 'apollo-client'; | |
const networkInterface = createNetworkInterface('/graphql'); | |
networkInterface.use({ | |
applyMiddleWare(req, next) => { | |
if (!req.options.header) { | |
req.options.header = {}; // Create the header object if needed. | |
} | |
req.options.header.authorization = localStorage.getItem('token') ? localStorage.getItem('token') : null; |
This file contains 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
COVERAGE_DIR=${COVERAGE_DIR:-coverage} | |
REPORT_NAME=${REPORT_NAME:-index.html} | |
author=$(git log --format='%an <%ae>' -1 $id_new | sed 's/\\/\\\\/g;s/\"/\\"/g') | |
message=$(git log --format=%s -1 $id_new | sed 's/\\/\\\\/g;s/\"/\\"/g') | |
latest="${COVERAGE_DIR}/${REPORT_NAME}" | |
[ -e "$COVERAGE_DIR" ] || mkdir "$COVERAGE_DIR" | |
cp "$1" "$latest" |
This file contains 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
require 'aws-sdk' | |
require 'faraday_middleware' | |
require 'faraday_middleware/aws_signers_v4' | |
require 'pp' | |
conn = Faraday.new(url: 'http://ENDPOINT') do |faraday| | |
faraday.request :aws_signers_v4, | |
credentials: Aws::InstanceProfileCredentials.new.credentials, | |
service_name: 'es', | |
region: 'REGION' |
This file contains 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
if (Meteor.is_client) { | |
var userName = "PatelNachiket"; | |
Template.hello.greeting = function () { | |
return "Fetch recent tweets from Twitter stream of user : " ; | |
}; | |
Template.hello.events = { | |
'click #fetchButton' : function () { | |
console.log("Recent tweets from stream!"); | |
$('#fetchButton').attr('disabled','true').val('loading...'); |
This file contains 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
curl https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch > /tmp/load.patch | |
rvm get head # always good to make sure you're up to date with RVM | |
rvm reload | |
rvm install ruby-1.9.2-p180 --patch /tmp/load.patch -n patched | |
rvm use ruby-1.9.2-p180-patched |
This file contains 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
;------------------------------------------------------------------------------- | |
; SIMPL - a very small Forth Inspired Extensible Language | |
; Implementing the Initialisation, TextTead, TextEval and UART routines in MSP430 assembly language | |
; | |
; A Forth-Like Language in under 1024 bytes | |
; Ken Boak May 2017 | |
; Loops, I/O, Strings and Delays added | |
; This version 888 bytes | |
; SIMPL_430ASM_5 |
This file contains 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
;------------------------------------------------------------------------------- | |
; SIMPL - a very small Forth Inspired Extensible Language | |
; Implementing the Initialisation, TextTead, TextEval and UART routines in MSP430 assembly language | |
; | |
; A Forth-Like Language in under 1024 bytes | |
; Ken Boak May 22nd/23rd 2017 | |
; Loops, I/O, Strings and Delays added | |
; This version 888 bytes | |
; SIMPL_430ASM_6 |
OlderNewer