The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| // Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. | |
| // You may assume that each input would have exactly one solution, and you may not use the same element twice. | |
| // You can return the answer in any order. | |
| // Example 1: |
| // Given a string s, return the longest palindromic substring in s. | |
| // Example 1: | |
| // Input: s = "babad" | |
| // Output: "bab" | |
| // Explanation: "aba" is also a valid answer. | |
| // Example 2: |
| // Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. | |
| // The overall run time complexity should be O(log (m+n)). | |
| // Example 1: | |
| // Input: nums1 = [1,3], nums2 = [2] | |
| // Output: 2.00000 |
| <?php | |
| class SlugService | |
| { | |
| public function slugify($string) | |
| { | |
| $sep = '-'; | |
| // Replace special chars with hyphen |
| $font-size-base: 14px !default; | |
| $line-height-base: 1.428571429 !default; // 20/14 | |
| $font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default; | |
| $font-family-serif: Georgia, "Times New Roman", Times, serif !default; | |
| //** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`. | |
| $font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default; | |
| $font-family-base: $font-family-sans-serif !default; | |
| //** Background color for `<body>`. | |
| $body-bg: #fff !default; |
| in .bash_profile: | |
| # Install a grunt plugin and save to devDependencies | |
| function gi() { | |
| npm install --save-dev grunt-"$@" | |
| } | |
| # Install a grunt-contrib plugin and save to devDependencies | |
| function gic() { | |
| npm install --save-dev grunt-contrib-"$@" |
| js2coffee file.js > file.coffee -V -it -sq | |
| # The help banner that is printed when `js2coffee` is called without arguments. | |
| BANNER = """ | |
| Usage: js2coffee [options] path/to/script.js | |
| js2coffee file.js | |
| js2coffee file.js > output.coffee | |
| cat file.js | js2coffee |
| Pod::Spec.new do |s| | |
| s.name = 'CocoaHTTPServer' | |
| s.version = '2.4' | |
| s.license = 'BSD' | |
| s.summary = 'A small, lightweight, embeddable HTTP server for Mac OS X or iOS applications.' | |
| s.homepage = 'https://github.com/robbiehanson/CocoaHTTPServer' | |
| s.authors = { 'Robbie Hanson' => '[email protected]' } | |
| s.source = { :git => 'https://github.com/zakdances/CocoaHTTPServer.git', :tag => "#{s.version}" } | |
| s.source_files = '{Core,Extensions}/**/*.{h,m}' | |
| s.requires_arc = true |
| pod spec create Peanut | |
| edit Peanut.podspec | |
| pod spec lint Peanut.podspec |