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
| import {random} from 'lodash' | |
| jest.mock('lodash', () => { | |
| return { | |
| ...jest.requireActual('lodash'), | |
| random: jest.fn(), | |
| } | |
| }); | |
| test('get 5', () => { |
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
| docker exec -it <image-id> bash |
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
| /** | |
| * Checkout branch by partial branch name | |
| * If only matches single branch, checks it out automatically. | |
| * If matches multiple branches, displays selection user can pick from | |
| * | |
| * Usage: | |
| * > gcobr JIRA-1432 | |
| * > gcobr partial-branch-name | |
| */ | |
| function gcobr { |
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
| du -cks * | sort -rn | head |
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
| for i in G M K; do du -ah | grep [0-9]$i | sort -nr -k 1; done | head -n 11 |
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
| find / -xdev -type f -size +100M |
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
| for d in `ls`; do pushd $d; for l in `ls`; do YOUR_COMMANDS_HERE; done; popd; done; |
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
| { | |
| "hasVertex": true, | |
| "hasFragment": true, | |
| "mix": { | |
| "blendMode": "normal", | |
| "compositeOperator": "source-atop" | |
| }, | |
| "mesh": { | |
| "columns": 100, | |
| "rows": 100 |
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
| module ActiveRecord | |
| class SchemaDumper | |
| # Monkeypatch table() to support mixed-engine database schemas by | |
| # making the table engine explicit | |
| def table(table, stream) | |
| columns = @connection.columns(table) | |
| begin | |
| tbl = StringIO.new |
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
| require 'pp' | |
| # | |
| # Cookbook Name:: memcached | |
| # Recipe:: default | |
| # | |
| node[:applications].each do |app_name,data| | |
| user = node[:users].first | |
| case node[:instance_role] |
NewerOlder