- Unzip
members.sql
mysql -uroot -e 'create database converter'
mysql -uroot --database converter -e 'source members.sql'
mysql -uroot -e 'select id, parent_id from converter.members' > boom.sql
go run main.go raw_node.go linked_node.go --input boom.sql --output bam.sql --regex '(\d+)\t(\d+)' --target 'converter.members' --leftName lft --rightName rght
mysql -uroot --database converter -e 'source bam.sql'
- Fire up xampp
- Make sure database is pointing to right place
- Point tree and accordion to root (id=1000)
- Navigate to http://localhost/sqltree/example_usage_php/accordion.php
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
<?php | |
$myArr = array_push($myArr, $someElem); | |
// Doesn't work. What? | |
array_push($myArr, $someElem); | |
// Works...ok... fine. |
Notes:
HeritageCF = heritage in the sense of every pivot's right to CF
PEZ = pivotal elastic zones
Elastic zone = You can also use Elastic IP addresses to mask the failure of an instance in one Availability Zone by rapidly remapping the address to an instance in another Availability Zone.
Thu Jul 16 2015 19:14:35 GMT-0600 (MDT) [DEA] OUT Starting app instance (index 0) with guid 55966ce0-56b0-4418-9b03-00fd49ba2883��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT -> 0.0268s��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT -- create_table(:matches)��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT == 20150714182755 AddMatchesAndClubs: migrating ===============================��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT -- create_table(:clubs)��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT -> 0.0221s��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT -> 0.0223s��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT -- add_reference(:matches, :clubs, {:index=>true, :foreign_key=>true})��
Thu Jul 16 2015 19:14:43 GMT-0600 (MDT) [App/0] OUT -- add_index(:clubs, [:name], {:unique=>true})��
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
public static <X> List<X> filterWithVarargPredicates( | |
List<X> allProducts, | |
Predicate<X>... predicates | |
) { | |
for (Predicate<X> predicate : predicates) { | |
allProducts = allProducts.stream() | |
.filter(predicate) | |
.collect(toList()); | |
} |
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
require 'httparty' | |
woffPattern = /url\((.+)\.woff2/ | |
fontFamilyPattern = /font-family: '(.+)'/ | |
fontStylePattern = /font-style: (.+);/ | |
fontWeightPattern = /font-weight: (.+);/ | |
fileContents = '' | |
File.open('boom.css', 'r') do |f| | |
f.each_line do |line| |
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
$email = '[email protected]' | |
$password = 'whatever' | |
$cell = '123456789' | |
// etc | |
$message = " | |
<MMS_message> | |
<LoginEmail>{$email}</LoginEmail> | |
<Password>${password}</Password> | |
<CellNumber>${cell}</CellNumber> | |
<Subject>{//etc}</Subject> |
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
var amounts = $("#Pending").find("td.amount"); | |
var total = 0; | |
for (i = 0; i < amounts.length; i++) { total += parseFloat($(amounts[i]).text().substring(1)) } |
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
curl http://www.thriftytraveler.com/ | grep -A1 post-title | grep "a href" | perl -n -e'/title="(.+)"/ && print "$1\n"' |