This file contains hidden or 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
[user] | |
useConfigOnly = true | |
# [includeIf "gitdir:~/Projects/company1/"] | |
# path = ~/Projects/company1/.gitconfig | |
[alias] | |
# add all | |
aa = add . |
Abbreviation | Description | Template text |
---|---|---|
cl | Insert console.log | console.log($PARAM$)$END$ |
clc | Insert console.log with colors | console.log('%cLOG: $NAME$', 'background: #222; color: $COLOR$', $NAME$)$END$ |
cls | Insert console.log with colors and selected text added as parameter | console.log('%cLOG: $SELECTION$', 'background: #222; color: $COLOR$', $SELECTION$)$END$ |
fun | Inserts function expression | function($PARAM$) { $END$ } |
This file contains hidden or 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
key.replace(new RegExp('^.+\.', ''), '.') // e.g. "ab.qwerty" => ".qwerty" |
Basic npx script template.
This file contains hidden or 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
#!/usr/bin/env node | |
const FileHound = require('filehound'); | |
const fs = require('fs'); | |
const files = FileHound.create() | |
.paths('./application') | |
.ext('ftlh') | |
.find(); |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
- Example: https://gist.github.com/atenni/5604522/raw/
- Works even when you change the filename.
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
This file contains hidden or 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
/* Goldbach's conjecture in JavaScript | |
* | |
* author: Igor Hercowitz | |
*/ | |
function isPrime(n) { | |
if (n % 2 === 0) return false; | |
var sqrtn = Math.sqrt(n)+1; |
This file contains hidden or 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
// ==UserScript== | |
// @name Disable Jira Click Edit | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Disable click edit in Jira issue descriptions | |
// @author fanuch | |
// @match https://*.atlassian.net/browse/* | |
// @match https://*.atlassian.net/jira/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net | |
// @grant none |