View symbols-outline.diff
This file contains 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
diff --git a/lua/symbols-outline/providers/markdown.lua b/lua/symbols-outline/providers/markdown.lua | |
index 225dd66..c7afabd 100644 | |
--- a/lua/symbols-outline/providers/markdown.lua | |
+++ b/lua/symbols-outline/providers/markdown.lua | |
@@ -4,7 +4,7 @@ local M = {} | |
-- probably change this | |
function M.should_use_provider(bufnr) | |
- return vim.api.nvim_buf_get_option(bufnr, "ft") == "markdown" | |
+ return vim.api.nvim_buf_get_option(bufnr, "ft") == "markdown" or vim.api.nvim_buf_get_option(bufnr, "ft") == "pandoc" |
View app.js
This file contains 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
// assets/js/app.js | |
// We need to import the CSS so that webpack will load it. | |
// The MiniCssExtractPlugin is used to separate it out into | |
// its own CSS file. | |
import css from "../css/app.css" | |
// webpack automatically bundles all modules in your | |
// entry points. Those entry points can be configured | |
// in "webpack.config.js". |
View create_post.exs
This file contains 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
defmodule MyBlog.Repo.Migrations.CreatePost do | |
use Ecto.Migration | |
def change do | |
create table(:posts, primary_key: false) do | |
add :id, :uuid, primary_key: true | |
add :body, :string | |
add :word_count, :integer | |
timestamps |
View .gitlab-ci.yml
This file contains 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
services: | |
- name: docker:dind | |
command: ["/bin/sh", "-c", "[[ -z $CERTIFICATE_URL ]] && ( echo Injecting no certificate && dockerd-entrypoint.sh || exit ) || ( echo Injecting certificate $CERTIFICATE_URL && wget $CERTIFICATE_URL -O /usr/local/share/ca-certificates/cert.crt && update-ca-certificates && dockerd-entrypoint.sh || exit )"] | |
variables: | |
## Uncomment this to inject a self-signed certificate into the docker:dind service | |
# CERTIFICATE_URL: http://my_server/my_corp.crt | |
# # disable TLS; see: https://gitlab.com/gitlab-org/gitlab-runner/issues/1350#note_199840999 and https://about.gitlab.com/2019/07/31/docker-in-docker-with-docker-19-dot-03/ | |
# DOCKER_TLS_CERTDIR: "" |
View DragScrollProvider.js
This file contains 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
// @flow | |
import * as React from "react"; | |
// I got this from https://gist.github.com/flushentitypacket/7717cb30d1b172e633cea864eeb4d2e7 | |
// Changes made | |
// 1. Added Y position | |
// 2. Converted from TypeScript to FlowType | |
// 3. Changed removeEventListeners to run off document.documentElement - they weren't working for me | |
// 4. Added event.preventDefault to mouse down handler - might prevent getting stuck in dragging state | |
// 5. Changed privateState updates to use a mutational style. |
View gist:bfbb0a532f9ecdce536d80eb3e8897c1
This file contains 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
☁ word-vector-service [master] ⚡ ./test-search.sh car | |
{"message":"You searched for words similar to car.","result":[{"word":"vehicle","similarity":0.7821096736772518},{"word":"cars","similarity":0.7423831256488782},{"word":"suv","similarity":0.716096183913142},{"word":"minivan","similarity":0.6907036207365957},{"word":"truck","similarity":0.6735788941063529},{"word":"jeep","similarity":0.6511331376892135},{"word":"pickup_truck","similarity":0.6441437657521791},{"word":"scooter","similarity":0.6381531537921122},{"word":"sedan","similarity":0.6336699305265391},{"word":"motorcycle","similarity":0.6256056151438883},{"word":"van","similarity":0.6115673116061694},{"word":"mercedes","similarity":0.6063581532609913},{"word":"vehicles","similarity":0.5998871012894661},{"word":"motorbike","similarity":0.5921168453789547},{"word":"bike","similarity":0.5854155253215375},{"word":"automobile","similarity":0.5838368457239428},{"word":"bmw","similarity":0.5806985605377539},{"word":"driver","similarity":0.5779392938202413},{ |
View benchmark-loops.php
This file contains 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 | |
/** | |
* Simple Benchmarker for PHP While Loops | |
* | |
* USES pcntl_fork() to split to different processes, | |
* so we assure RAM utilization doesn't "bleed" | |
* | |
* Usage: | |
* We are using php files for the large test, just to get a bunch of "random" |
View gist:acd0e70913676f84cc35
This file contains 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
168405 | |
_node: "A2SbQc0TQ82Jg2urmB4A4A" | |
_index: "ot_qa2-3" | |
_type: "jobs" | |
_id: "lZkNWotoQVKqiFbaUJqeXA" | |
_score: 0.28624028 | |
fields: | |
association_key: | |
- "168405" |
View gist:7475460
This file contains 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
# =============== CODE ========================= | |
$data = array( | |
'EventPresenter' => array( | |
0 => 1000, | |
'corp_id' => 2000, | |
), | |
); | |
$corp_id = Set::extract($data, "/EventPresenter/corp_id"); | |
pr(compact('corp_id')); |
View pre-commit
This file contains 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 | |
#This goes in .git/hooks/pre-commit | |
git diff --cached --name-status | while read st file; do | |
# skip deleted files | |
if [ "$st" == 'D' ]; then continue; fi | |
if grep -q "^>>>>" "$file"; then | |
echo "Conflict detected in $file, aborting commit." | |
exit 1 |