Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| bundle gem change_ledger --coc --mit --exe --test=rspec --ci=github --linter=standard |
| const likert1 = { | |
| id: 1, | |
| identifier: 'abc123', | |
| type: 'Likert', | |
| verified_at: '2023-10-01', | |
| title: null, | |
| question: 'Do you like these companies?', | |
| columns: [ | |
| { id: 1, label: 'Yes', color: '#ff0000' }, | |
| { id: 2, label: 'No', color: '#0ff000' }, |
| source 'https://rubygems.org' | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| ruby '2.5.7' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '~> 6.0.2' | |
| # Use Puma as the app server | |
| gem 'puma', '~> 4.1' | |
| # Use SCSS for stylesheets |
| <?php | |
| /** | |
| * Expects a multi-dimensional array and returns a flattened array contianing the values. | |
| * | |
| * @param array $array A multi-dimensional array. | |
| * @return array | |
| */ | |
| function flatten_array($array) { | |
| $flatArray = []; | |
| foreach ($array as $item) { |
| <?php | |
| function flatten_array($array) { | |
| $flatArray = []; | |
| foreach ($array as $item) { | |
| if (is_array($item)) { | |
| $flatArray = array_merge( $flatArray, flatten_array($item) ); | |
| } else { | |
| $flatArray = array_merge($flatArray, $item); | |
| } | |
| } |
| <?php | |
| function mandatory_excerpt($data) { | |
| $excerpt = $data['post_excerpt']; | |
| if (empty($excerpt)) { | |
| if ($data['post_status'] === 'publish') { | |
| add_filter('redirect_post_location', 'excerpt_error_message_redirect', 99); | |
| } | |
| $data['post_status'] = 'draft'; | |
| } | |
| return $data; |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| /* http://themarklee.com/2013/10/16/simple-crossfading-slideshow-css/ */ | |
| .css-slideshow { | |
| position: relative; | |
| max-width: 495px; | |
| height: 370px; | |
| margin: 1em auto .5em auto; | |
| font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | |
| font-weight: 300; | |
| } | |
| .css-slideshow figure { |
| <?php | |
| // Section 5: edit a row | |
| // You'll need to get the etag and row ID, and send a PUT request to the edit URL | |
| $rowid = 'cre1l'; // got this and the etag from the table data output from section 3 | |
| $etag = 'NQ8VCRBLVCt7ImA.'; | |
| $url = "https://spreadsheets.google.com/feeds/list/$fileId/od6/private/full/$rowid"; | |
| $method = 'PUT'; | |
| $headers = ["Authorization" => "Bearer $accessToken", 'Content-Type' => 'application/atom+xml', 'GData-Version' => '3.0']; | |
| $postBody = "<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\" xmlns:gd=\"http://schemas.google.com/g/2005\" gd:etag='"$etag"'><id>https://spreadsheets.google.com/feeds/list/$fileid/od6/$rowid</id><gsx:gear>phones</gsx:gear><gsx:quantity>6</gsx:quantity></entry>"; | |
| $req = new Google_Http_Request($url, $method, $headers, $postBody); |
| ## Customize the test machine | |
| machine: | |
| timezone: | |
| America/New_York # Set the timezone | |
| # Version of ruby to use | |
| php: | |
| version: | |
| 5.6.5 |