This gist details the following:
- Converting a Subversion (SVN) repository into a Git repository
- Purging the resultant Git repository of large files
- Retrieve a list of SVN commit usernames
| const _ = require('lodash') | |
| function genrows(groups, groupKey) { | |
| return _.toPairs(groups) | |
| .map(([key, data]) => ({[groupKey]: key, data})) | |
| } | |
| function gengroups(arr, iteratee, key) { | |
| const grouped = _.groupBy(arr, iteratee) | |
| return genrows(grouped, key) |
This gist details the following:
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
querymutationReference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
Find the Discord channel in which you would like to send commits and other updates
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
| <template> | |
| <div :class="{'loading': loading}" class="pager-data-wrapper"> | |
| <!-- Pagination Slot --> | |
| <slot :result="getResult()"> | |
| <div class="text-center alert-info pb-3"> | |
| <span v-if="!loading"> | |
| {{ result.length }} items found. render it using v-for="item in result" | |
| </span> | |
| <span v-if="loading"> |
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
| $config = preg_replace('#=>\s*array \(#', '=> [', $config); | |
| $config = preg_replace('#\),#', '],', $config); | |
| $config = preg_replace('#,(\s*)\]#', '$1]', $config); | |
| $config = preg_replace('#\d+ => #', '', $config); | |
| $config = preg_replace('#\[\s+\]#', '[]', $config); | |
| $config = str_replace(' ', "\t", $config); | |
| <?php | |
| // ... | |
| /** | |
| * Define the routes for the application. | |
| * | |
| * @param \Illuminate\Routing\Router $router | |
| * @return void | |
| */ |
| #!/bin/bash | |
| # Hadoop cluster start-up script | |
| # | |
| # 1. Format the namenode (only required on 1st start!) | |
| # sudo -u hdfs hdfs namenode -format | |
| # 2. Start HDFS | |
| for x in `cd /etc/init.d ; ls hadoop-hdfs-*` ; do sudo service $x start ; done | |
| # 3. Create the /temp directory |