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 | |
# | |
# There was an error while executing `VBoxManage`, a CLI used by Vagrant | |
# for controlling VirtualBox. The command and stderr is shown below. | |
# | |
# Command: ["hostonlyif", "create"] | |
# | |
# Stderr: 0%... | |
# Progress state: NS_ERROR_FAILURE | |
# VBoxManage: error: Failed to create the host-only adapter |
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
# Problem: | |
# | |
# If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each. | |
# Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file. | |
# This means your ansible playbook will hang in this case. | |
# | |
# You can however use the ansible git module to checkout your repo in multiple steps, like this: | |
# | |
- hosts: webserver | |
vars: |
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
# | |
# Removes duplicates from a directory based on checksum | |
# Run each line manually and check if it is the result you expect | |
# | |
# Based on: http://www.chriswrites.com/how-to-find-and-delete-duplicate-files-in-mac-os-x/#Terminal | |
# And: http://stackoverflow.com/a/1450288/204610 | |
# Find duplicates and write to duplicates-report.txt | |
find . -type f -exec cksum {} \; | sort | tee /tmp/f.tmp | cut -f 1,2 -d ' ' | uniq -d | grep -hif /dev/stdin /tmp/f.tmp > duplicates-report.txt |
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
app/code/community/* app/code/community/ | |
app/design/adminhtml/default/default/layout/* app/design/adminhtml/default/default/layout/ | |
app/design/adminhtml/default/default/template/* app/design/adminhtml/default/default/template/ | |
app/etc/modules/* app/etc/modules/ |
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 | |
# typical htdoc file and directory permissions | |
# + -o is a way to combine multiple finds in one | |
sudo find . -type d -exec chmod 755 {} + -o -type f -exec chmod 644 {} \; |
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 small script that works like `cd` except that | |
# it keeps cd-ing until it reachs the project root | |
# project is defined by default as the directory | |
# that contains a .git sub-directory. | |
# | |
# Change this behavior like this: | |
# CDR_ROOT_ID=composer.json |
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
module.exports = { | |
baseURL: 'resources/assets/', | |
transpiler: 'plugin-babel', | |
defaultJSExtensions: true, | |
meta: { | |
'vendor/JsBarcode/*': { format: 'global', deps: ['jquery'] }, | |
'vendor/knockout/build/output/knockout-latest.js': { format: 'global', deps: ['jquery'] }, | |
'vendor/materialize-css/dist/js/materialize.js': { format: 'global', deps: ['jquery'] }, | |
'vendor/moment/min/moment.min.js': { format: 'global', deps: ['jquery'] }, | |
'vendor/**/*js': { |
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
/** | |
* Knockout.js extension that gives both new and old value to | |
* subscription functions. | |
* | |
* Credit: http://stackoverflow.com/a/18184016/204610 | |
* | |
* Changed JBeagle's code to return a disposable subscription | |
* object so it conforms to subscribe() | |
*/ | |
ko.subscribable.fn.subscribeChanged = function (callback) { |
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 A { | |
public $param = 7; | |
} | |
class B { | |
private $param = 28; | |
} |
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
elementAt : List a -> Int -> Maybe a | |
elementAt xs n = | |
case List.drop (n - 1) xs of | |
[ ] | |
-> Nothing | |
y::ys | |
-> Just y |
OlderNewer