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
#!/usr/bin/env node | |
/* | |
* Install dependencies with: | |
* npm install request request-promise-native bottleneck | |
* | |
* Replace YOUR_TENANT_NAME, MGMT_TOKEN, and FILENAME | |
* The input file (FILENAME) should contain a list of user ids to delete, separated by newlines | |
*/ |
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 'bundler/setup' | |
require 'rake' | |
require 'dotenv/tasks' | |
require 'nokogiri' | |
require 'selenium-webdriver' | |
require 'spectre_client' | |
require 'open-uri' | |
WIDTHS = [1200, 768, 375] | |
BROWSER = :firefox |
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
<div class="person"> | |
<div class="person__body"></div> | |
<div class="person__image"></div> | |
</div> |
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
<!DOCTYPE html> | |
<!--[if gt IE 9]><!--> <html class="gt-ie9 no-js" lang="en" prefix="og: http://ogp.me/ns#"> <!--<![endif]--> | |
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> | |
<title> | |
Sweden: Saab restarts car production — HSBC Global Connections | |
</title> |
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
1. Drop all incoming connections to ElasticSearch on port 9200: | |
iptables -A INPUT -j DROP -p tcp --destination-port 9200 -i eth0 | |
2. Persist this change on reboot: | |
iptables-save > /root/my_iptables_config | |
/sbin/iptables-restore < /root/my_iptables_config | |
3. Create a directory in your web application, I usually name mine /_es and add an .htaccess file. |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var go=120; | |
var Robot = function(robot) { | |
}; | |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
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
// camelcase body ID e.g. #page-home => home, #page-contact-us => contactUs | |
var action = $('body').attr('id') | |
.replace(/^(page-)/, '') | |
.replace(/^([a-z]{1})/, function(letter) { return letter.toUpperCase(); }) | |
.replace(/-([a-z]{1})/, function(letter) { return letter.replace(/-/,'').toUpperCase(); }); | |
var Controller = { | |
// #page-home | |
home: function() { | |
... |
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
<html> | |
<body> | |
<style> | |
* { | |
margin: 0; | |
font-family: Arial; | |
line-height: 1.6; | |
} | |
body { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:my_function="http://example.com"> | |
<!-- | |
Note the function declaration above. | |
While the namespace URI is from the function's extension, I've made up the prefix 'my_function' just for use in this doc. | |
--> |
NewerOlder