brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php53 php-cs-fixer php-md php-code-sniffer
php-cs-fixer self-update
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
# Ignore docs files | |
styles/.sass-cache | |
styles/.sass-cache/* | |
To untrack a single file that has already been added/initialized to your repository, i.e., stop tracking the file but not delete it from your system use: git rm --cached filename | |
To untrack every file that is now in your .gitignore: | |
First commit any outstanding code changes, and then, run this command: |
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
package main | |
import ( | |
"./binding" | |
"fmt" | |
) | |
func main() { | |
binding.PrintHello() | |
binding.Seed(1) | |
fmt.Println(binding.Random()) |
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 | |
/** | |
* Implements hook_form_alter(). | |
* | |
* Redirects user logins to the front page. | |
*/ | |
function HOOK_form_user_login_alter(&$form, &$form_state) { | |
$form['#action'] = url('user', array('query' => array('destination' => '<front>'))); | |
} |
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 | |
/** | |
* Implements hook_menu(). | |
*/ | |
function mymodule_menu() { | |
$items['mymodule/%ctools_js/add'] = array( | |
'page callback' => 'mymodule_node_add_modal_callback', | |
'page arguments' => array(1), | |
'access arguments' => array('access content'), |
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
/** | |
* Implements hook_js_alter(). | |
*/ | |
function YOUR_THEME_js_alter(&$js) { | |
if (isset($js['misc/jquery.js'])) { | |
$jquery_path = 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js'; | |
$js['misc/jquery.js']['data'] = $jquery_path; | |
$js['misc/jquery.js']['version'] = '1.8.0'; | |
$js['misc/jquery.js']['type'] = 'external'; | |
} |
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 | |
/** | |
* @file helpers.module | |
*/ | |
/** | |
* Implements hook_custom_theme(). | |
* Activer le theme uniquement pour le themer (par adresse IP) | |
*/ |
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
Verifying that +knibals is my blockchain ID. https://onename.com/knibals |
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
package main | |
import ( | |
"net/http" | |
"log" | |
) | |
func redirect(w http.ResponseWriter, req *http.Request) { | |
// remove/add not default ports from req.Host | |
target := "https://" + req.Host + req.URL.Path | |
if len(req.URL.RawQuery) > 0 { |
OlderNewer