Skip to content

Instantly share code, notes, and snippets.

@gecbla
gecbla / gist:d8e1de32f93e83be9dab9ee1a2358a89
Last active May 30, 2016 16:50
Change position of FB chat window. Use it with Chrome Stylebot extension!
/* https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en */
#ChatTabsPagelet > div > div > div.uiToggle {
position: static;
}
#ChatTabsPagelet div.fbNubFlyout.fbDockChatTabFlyout.uiContextualLayerParent {
bottom: 0;
left: -1325px;
}
@gecbla
gecbla / chrome-dev-tools-jquery.js
Created February 22, 2017 11:34
Dynamicly add jQuery to Chrome Dev Tools
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
@gecbla
gecbla / jtt.php
Created May 16, 2018 17:45 — forked from iansltx/jtt.php
Quick CLI for adding work log times in JIRA
#!/usr/bin/env php
<?php
if ($argc < 3) {
die("Usage: ./jtt.php ISSUE-1 30m optional comment here\n");
}
$username = 'EMAIL_GOES_HERE';
$token = 'API_KEY_HERE'; // see https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/
$team = 'TEAM_NAME_HERE';
@gecbla
gecbla / guzzle-retry.php
Created June 24, 2018 18:08 — forked from gunnarlium/guzzle-retry.php
Example of how to create a retry subscriber for Guzzle 6
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Request as Psr7Request;
use GuzzleHttp\Psr7\Response as Psr7Response;
use Psr\Log\LoggerInterface;
const MAX_RETRIES = 2;
@gecbla
gecbla / Comments.tmPreferences
Created August 15, 2019 13:15
<ST3>/Packages/User/PHP/Comments.tmPreferences
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.php</string>
<key>settings</key>
<dict>
@gecbla
gecbla / gist:ec5392e15498ee1e42f4141843400330
Created August 15, 2019 13:31
ST3 toggle comment and move focus
<ST3>/Packages/User/Macros/toogle_comment.sublime-macro
[
{
"command": "toggle_comment",
"args": {"block": false }
},
{
"command": "move",
"args": {"by": "lines", "forward": true }
@gecbla
gecbla / jq-cheetsheet.md
Created November 18, 2021 19:42 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq