- make sure the WebStorm "Textmate bundles support" plugin is enabled
- download the Textmate bundle from https://github.com/andrespagella/JSX-TextMate-Bundle
- replace /Syntaxes/JSX.tmLanguage with this https://github.com/yungsters/sublime/blob/master/tmLanguage/JavaScript%20(JSX).tmLanguage (presumeably better?)
- add the textmate bundle to WebStorm
- make sure the *.jsx extension is handled by "Files supported via Textmate bundles"
- in case of color issues: you need to map your WebStorm scheme to a Textmate scheme. The Textmate color schemes are stored in .WebStorm7\config\plugins\textmate\lib\themes (on windows) and can be pruned to get rid of weird background artifacts
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
#!/bin/bash | |
# | |
# MicroStack by Canonical - Helper Install Script | |
# | |
# This script installs the MicroStack snap and setups up the networking fix developed by Rodrigo Nascimento | |
# | |
# Original blog post available here: https://connection.rnascimento.com/2021/03/08/openstack-single-node-microstack/ | |
# | |
# Note: Make sure you adjust the INTERFACE and IP_ADDRESS variables to your environment. | |
# If you make the IP_ADDRESS the same as your current address you won't lose connection. |
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
'use strict'; | |
var React = require('react'), | |
classSet = require('react/lib/cx'), | |
_ = require('underscore'); | |
var ClassNameMixin = { | |
propTypes: { | |
className: React.PropTypes.string, | |
context: React.PropTypes.string |
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
using System.IO; | |
using System.Text; | |
using System.Web; | |
using System.Web.Optimization; | |
using Jurassic; | |
using System.Globalization; | |
namespace Fewt.Web | |
{ |
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 code is for Twitter Bootstrap 2! | |
# -------------------------------------------- | |
# | |
# The MIT License (MIT) | |
# Copyright (c) 2012-2015 Dennis Riehle | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
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
web: node app.js | |
worker: node consumer.js |
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
//npm install b64url | |
//A signed_request for testing: | |
//WGvK-mUKB_Utg0l8gSPvf6smzacp46977pTtcRx0puE.eyJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImV4cGlyZXMiOjEyOTI4MjEyMDAsImlzc3VlZF9hdCI6MTI5MjgxNDgyMCwib2F1dGhfdG9rZW4iOiIxNTI1NDk2ODQ3NzczMDJ8Mi5ZV2NxV2k2T0k0U0h4Y2JwTWJRaDdBX18uMzYwMC4xMjkyODIxMjAwLTcyMTU5OTQ3NnxQaDRmb2t6S1IyamozQWlxVldqNXp2cTBmeFEiLCJ1c2VyIjp7ImxvY2FsZSI6ImVuX0dCIiwiY291bnRyeSI6ImF1In0sInVzZXJfaWQiOiI3MjE1OTk0NzYifQ | |
function parse_signed_request(signed_request, secret) { | |
encoded_data = signed_request.split('.',2); | |
// decode the data | |
sig = encoded_data[0]; | |
json = base64url.decode(encoded_data[1]); | |
data = JSON.parse(json); // ERROR Occurs Here! |
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
// Load the Facebook API | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : 'YOUR_APP_ID', | |
status : true, // check login status | |
cookie : true, // enable cookies to allow the server to access the session | |
xfbml : true // parse XFBML | |
}); | |
// Browser-specific hacks to make FB Connect more reliable |
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
" | |
" While editing a Markdown document in Vim, preview it in the | |
" default browser. | |
" | |
" Author: Nate Silva | |
" | |
" To install: Place markdown.vim in ~/.vim/ftplugin or | |
" %USERPROFILE%\vimfiles\ftplugin. | |
" | |
" To use: While editing a Markdown file, press ',p' (comma p) |
NewerOlder