Pattern
First defined in CSS level |
---|
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
# Make a local copy | |
service mysql stop | |
cp -ra /var/lib/mysql mysqldata | |
service mysql start | |
# Make a local dump | |
mysqldump --routines --events --flush-privileges --all-databases > all-databases.sql | |
# drop everything except the mysql table | |
mysql -e "SELECT DISTINCT CONCAT ('DROP DATABASE ',TABLE_SCHEMA,' ;') FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA <> 'mysql' AND TABLE_SCHEMA <> 'information_schema';" | tail -n+2 > drop.sql |
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
Make a list of your todos in /etc/motd: | |
* Dump prod.sql | |
- Don't forget to sanitize | |
* Finish Foo project | |
And now you'll see it every time you open a new prompt: | |
* Dump prod.sql | |
- Don't forget to sanitize |
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
({ | |
/* Author: Angel Magaña -- cheleguanaco@cheleguanaco.com | |
* File: ./custom/clients/base/views/subpanel-list/subpanel-list.js | |
* | |
* Extended Subpanel List controller to suppress "Edit" functionality | |
* on "Calls" subpanel throughout Sugar (Sugar 7.2+) | |
* | |
*/ | |
extendsFrom: 'SubpanelListView', |
This is intended as a quick reference and showcase. For more complete info, see John Gruber's original spec and the Github-flavored Markdown info page.
Note that there is also a Cheatsheet specific to Markdown Here if that's what you're looking for.
You can play around with Markdown on our live demo page.
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 | |
# | |
# A wrapper arround composer to make it possible to annotate your composer.json file | |
# | |
# ## Installation | |
# | |
# 1) Install composer globally: | |
# - composer global require composer/composer @dev | |
# 2) Create a /usr/bin/composer file with the content of this 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
for t in $(mysql -NBA -D <database_name> -e 'show tables') | |
do | |
echo "DUMPING TABLE: $t" | |
mysqldump <database_name> $t | gzip > <some_dir>/$t.sql.gz | |
done |
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
<?php | |
class Opportunities { | |
public function __construct() { | |
# Instantiate this so we can read all of our resources into RAM ONCE | |
$this->generator = new OpportunityGenerator(); | |
} | |
public function populateForAccount(&$account) { | |
# Need our demo array |
This plugin simplifies the use of HTML5 custom data attributes in your jQuery code. It adds a function named .dataAttr()
to the jQuery namespace, which acts as a wrapper for jQuery.attr()
.
…
OlderNewer