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
| /** | |
| * Copyright 2013 Omar Miatello - omar.miatello@justonetouch.it | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
| #!/bin/bash | |
| # Created on 7/17/13 by Ryan Sechrest | |
| # Deploys pushed branch from the origin repository to the web directory | |
| if [[ (-n $1) && (-n $2) && (-n $3) ]]; then | |
| # Set path to project directory | |
| project_path="/var/www/domains/$2/$3" |
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
| WORKSPACE = Artsy.xcworkspace | |
| SCHEME = Artsy | |
| CONFIGURATION = Beta | |
| APP_PLIST = Artsy/App/Art.sy-Info.plist | |
| BUNDLE_ID = net.artsy.artsy.beta | |
| PLIST_BUDDY = /usr/libexec/PlistBuddy | |
| BUNDLE_VERSION = $(shell $(PLIST_BUDDY) -c "Print CFBundleVersion" $(APP_PLIST)) | |
| GIT_COMMIT = $(shell git log -n1 --format='%h') | |
| ALPHA_VERSION = $(BUNDLE_VERSION)-$(BUILD_NUMBER)-$(GIT_COMMIT) |
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
| #!/usr/bin/env ruby | |
| # make sure you have gd and fastimage_resize | |
| # brew install gd | |
| # sudo gem install fastimage_resize | |
| require 'fastimage_resize' | |
| require 'optparse' | |
| require 'json' | |
| require 'fileutils' |
This gist creates an init.d script to automatically run Node-RED at boot time.
To run it as a single step you can cut paste the following single line command
sudo wget -O /tmp/download https://gist.github.com/bigmonkeyboy/9962293/download && sudo tar -zxf /tmp/download --strip-components 1 -C /etc/init.d && sudo chmod 755 /etc/init.d/nodered && sudo update-rc.d nodered defaults
or click right-click "save as" this link - But please read the script first and satisfy yourself it's safe to execute in your environment...
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
| import operator | |
| from pprint import pprint | |
| def is_dict(d): | |
| return isinstance(d, dict) | |
| def get(c, k, default=None): | |
| try: | |
| return c[k] | |
| except (IndexError, KeyError, TypeError): |
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
| import Foundation | |
| extension String | |
| { | |
| var length: Int { | |
| get { | |
| return countElements(self) | |
| } | |
| } | |
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 | |
| namespace GM\VirtualPages; | |
| /** | |
| * @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com> | |
| * @license http://opensource.org/licenses/MIT MIT | |
| */ | |
| class Controller implements ControllerInterface { | |
| private $pages; |

