Skip to content

Instantly share code, notes, and snippets.

@iamnimnul
iamnimnul / JIRA Rapid Board points
Last active April 3, 2018 13:45
JIRA Rapid Board - table header with sum of points in the column (bookmarklet)
javascript:(function () {
jQuery('.ghx-column-headers li').each(function (index) {
var pointsSum = 0;
jQuery('.ghx-columns li').eq(index).find(".aui-badge[title='Story Points']").each(function (index) {
pointsSum += parseInt(jQuery(this).text());
});
var span = jQuery('<span>(' + pointsSum + ')</span>');
span.css({'display': 'inline-block', 'right': 0, 'position': 'absolute'});
jQuery(this).append(span);
});
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
@iamnimnul
iamnimnul / ErrorFocus.jsx
Last active January 8, 2019 10:21 — forked from dphrag/ErrorFocus.jsx
Formik Scroll To First Invalid Element W/O Refs
import React from 'react';
import { connect } from 'formik';
class ErrorFocus extends React.Component {
componentDidUpdate(prevProps) {
const { isSubmitting, isValidating, errors } = prevProps.formik;
const keys = Object.keys(errors);
if (keys.length > 0 && isSubmitting && !isValidating) {
const selector = `[name="${keys[0]}"]`;
const errorElement = document.querySelector(selector);
@iamnimnul
iamnimnul / ekg-password-recovery.sh
Created March 14, 2019 11:06
eksperymentalny klient gadu-gadu ekg - odzyskiwanie hasła
grep '^password ' .gg/config | cut -b 11- | base64 -d; echo
@iamnimnul
iamnimnul / ioncube_loader_lin64_7.1_10.3.5_190429.so
Last active April 29, 2019 15:58
php 7.1 - ioncube loader - alpine linux 64bit
This file has been truncated, but you can view the full file.
@iamnimnul
iamnimnul / PrivateRoute.jsx
Created November 5, 2019 11:32
PrivateRoute in react 16.11 react-router 5.1
function PrivateRoute({component: Component, isAuthenticated: isAuthenticated, ...rest}) {
return (
<Route
{...rest}
render={props => isAuthenticated ? (<Component {...props} />) : (<Redirect to={{pathname: "/login"}} />)}
/>
);
}
@iamnimnul
iamnimnul / copy_table.py
Created August 28, 2020 13:59 — forked from pawl/copy_table.py
Copy Schema Of A Remote Database Table To A New Local Table With SQLalchemy
from sqlalchemy import create_engine, Table, Column, Integer, Unicode, MetaData, String, Text, update, and_, select, func, types
# create engine, reflect existing columns, and create table object for oldTable
srcEngine = create_engine('mysql+mysqldb://username:password@111.111.111.111/database') # change this for your source database
srcEngine._metadata = MetaData(bind=srcEngine)
srcEngine._metadata.reflect(srcEngine) # get columns from existing table
srcTable = Table('oldTable', srcEngine._metadata)
# create engine and table object for newTable
destEngine = create_engine('mysql+mysqldb://username:password@localhost/database') # change this for your destination database
#########################################################################################
# Name m00nie::youtube
# Description Uses youtube v3 API to search and return videos
#
# Version
# 3.1.2 - Added support for live urls
# 3.1.1 - Removed encoding converter, added support for shorts
# 3.1 - Yet more duration decoding fixes. Specific case of 00s videos less than
# an hour too. It also adds checks for videos <24 hours long (who knew)
# Hope this is the last of the duration crap
@iamnimnul
iamnimnul / git lol.md
Created July 24, 2023 16:54 — forked from Omerr/git lol.md
git lol - an alias to Git that shows the commit graph in a pretty format

log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

To configure as an alias git lol:

git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit"

https://github.com/mayakyler/link-shorteners/blob/main/py-link-shorteners/link_shorteners/link-shorteners.txt