Folder Structure
Motivations
- Clear feature ownership
- Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
| #!/bin/bash | |
| ############################################### | |
| # To use: | |
| # https://raw.github.com/gist/2776351/??? | |
| # chmod 777 install_postgresql.sh | |
| # ./install_postgresql.sh | |
| ############################################### | |
| echo "*****************************************" | |
| echo " Installing PostgreSQL" | |
| echo "*****************************************" |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| <?php declare(strict_types=1); | |
| require_once "✨.🐘"; | |
| ✨($_)->strlen("foo")->var_dump($_); |
| <? | |
| /** | |
| * Repeatable Custom Fields in a Metabox | |
| * Author: Helen Hou-Sandi | |
| * | |
| * From a bespoke system, so currently not modular - will fix soon | |
| * Note that this particular metadata is saved as one multidimensional array (serialized) | |
| */ | |
| function hhs_get_sample_options() { |
| <?php | |
| add_action('admin_init', 'add_meta_boxes', 1); | |
| function add_meta_boxes() { | |
| add_meta_box( 'repeatable-fields', 'Audio Playlist', 'repeatable_meta_box_display', 'post', 'normal', 'high'); | |
| } | |
| function repeatable_meta_box_display() { | |
| global $post; |
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:
| /* | |
| * copyright | |
| * http://timarcher.com/blog/2007/04/simple-java-class-to-des-encrypt-strings-such-as-passwords-and-credit-card-numbers/ | |
| */ | |
| package com.tima.crypto; | |
| import java.io.*; | |
| import java.util.*; | |
| import java.security.*; |
| /** | |
| * ABOUT | |
| * Google Apps Script to post a message to Slack when someone responds to a Google Form. | |
| * | |
| * Uses Slack incoming webhooks - https://api.slack.com/incoming-webhooks | |
| * and FormsResponse - https://developers.google.com/apps-script/reference/forms/form-response | |
| * | |
| * | |
| * AUTHOR | |
| * Akash A <github.com/akash1810> |
| function _openCamera() { | |
| Titanium.Media.showCamera({ | |
| success : function(event) { | |
| if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) { | |
| _uploadReport(event.media); | |
| } else { | |
| alert("No es una imagen =" + event.mediaType); | |
| } | |
| }, | |
| error : function(error) { |