- Check for an existing
.gitignorefile in the project directory
ls -aThis is my upload-file type for what I use at work. We use angular-upload for the upload service to do the actual file uploading. We also have several abstractions and use ES6 that may confuse you a little bit (sorry about that). Hopefully this gets you started though.
| #!/bin/bash | |
| sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
| sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
| // Use Parse.Cloud.define to define as many cloud functions as you want. | |
| // For example: | |
| Parse.Cloud.define("hello", function(request, response) { | |
| response.success("Hello world!"); | |
| }); | |
| Parse.Cloud.define("userWithEmailExists", function(request, response) { | |
| var email = request.params.email; | |
| if (email != null && email !== "") { | |
| email = email.trim(); |
| // Java function for converting simple XPath to CSS Selector. | |
| // Used cssify.js from [cssify.js](https://gist.github.com/Dither/1909679) | |
| // Removed log statements (as window objects aren't supported in ScriptEngine) | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import javax.script.Invocable; | |
| import javax.script.ScriptEngine; | |
| import javax.script.ScriptEngineManager; |
| var uploadify_data = { | |
| 'AWSAccessKeyId': '<%= @uploadify_data[:access_key] %>', | |
| 'bucket': '<%= @uploadify_data[:bucket] %>', | |
| 'acl': 'private', | |
| 'key': '<%= @uploadify_data[:key] %>${filename}', | |
| 'signature': '<%= @uploadify_data[:signature] %>', | |
| 'policy': '<%= @uploadify_data[:policy] %>', | |
| 'success_action_status': '<%= @uploadify_data[:sas] %>', | |
| 'folder': '', | |
| 'Filename': '' |
| #!/usr/bin/env coffee | |
| # Call the program with: coffee phantom.coffee http://url.to/screengrab | |
| phantom = require 'phantom' # npm install phantom | |
| child_process = require 'child_process' | |
| url = process.argv[2] | |
| createScreenshot = (page, filename) -> |
| package com.cyp.codechef.marcontest; | |
| import java.io.IOException; | |
| import java.util.Scanner; | |
| /* | |
| * Cypronmaya - Codechef March 2012 Contest - Problem Code : SPOON | |
| */ | |
| class SPOON { |
| // JavaScript function for converting simple XPath to CSS selector. | |
| // Ported by Dither from [cssify](https://github.com/santiycr/cssify) | |
| // Example: `cssify('//div[@id="girl"][2]/span[@class="body"]//a[contains(@class, "sexy")]//img[1]')` | |
| var sub_regexes = { | |
| "tag": "([a-zA-Z][a-zA-Z0-9]{0,10}|\\*)", | |
| "attribute": "[.a-zA-Z_:][-\\w:.]*(\\(\\))?)", | |
| "value": "\\s*[\\w/:][-/\\w\\s,:;.]*" | |
| }; |
| package interviewstreet; | |
| import java.util.Arrays; | |
| import java.util.Scanner; | |
| public class Solution { | |
| int min=1; | |
| int val=1; | |
| public static void main(String[] args) { |