Skip to content

Instantly share code, notes, and snippets.

Avatar

Felipe Knorr Kuhn knorrium

View GitHub Profile
@DarrenN
DarrenN / get-npm-package-version
Last active Sep 15, 2022 — forked from yvele/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
View get-npm-package-version
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active Sep 19, 2022
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
View ultimate-ut-cheat-sheet.md
@ekashida
ekashida / index.css
Created Oct 21, 2014
Events dispatched by Good Guy Mobile Safari on almost-clicks
View index.css
div {
padding: 20px 0;
margin: 5px 0;
background-color: lightgreen;
outline: 1px solid blue;
display: inline-block;
}
a {
background-color: yellow;
}
@noreiller
noreiller / backup-full.sh
Last active Jan 4, 2016
Geeksphone Peak backup scripts
View backup-full.sh
#!/bin/sh
BACKUP_DATE=`date +%Y-%m-%d_%H-%M-%S`
BACKUP_DIR="~/PEAK/BACKUPS/$BACKUP_DATE"
mkdir -p "$BACKUP_DIR"
cd "$BACKUP_DIR"
sudo adb pull /data/local/storage/persistent/
View embedgist2.js
$(document).ready(function() {
var embedGist = function () {
$('a[href^="https://gist.github.com"]').each(function(i) {
if (writeCapture) {
var wrapper = $("<div></div>");
wrapper.insertAfter(this);
writeCapture.html(wrapper[0], '<script src="'+$(this).attr("href")+'.js"></script>');
$(this).remove();
} else {
@jimmynotjim
jimmynotjim / _instructions.md
Last active Aug 26, 2022
Setup macOS 12 Monterey
View _instructions.md

Leaving this for historical reasons, but with the latest iteration I set up proper dotfiles. Check em out

Setup macOS with a Clean Install

After too many years of tinkering my machine is a bit all over. With Mojave High Sierra Montery I wanted to start fresh

1. Run Software Update

Make sure everything is up to date.

@feelobot
feelobot / Readme.md
Created Nov 4, 2013
Troubleshooting Webview with Ruby:
View Readme.md

Once this is included in your project you can use

Helper.find_web_element("div#ad_banner")

If if does not work then the element does not exist. I am sure the code can be cleaned up but this is how I managed to solve my issues with hybrid app testing.

View d3lib.md

chartFactory

/affini-tech/ChartFactory

Based on D3.JS and Dimple, ChartFactory provide the ability to build quickly D3.JS charts without coding any lines of javascript. Just define your dashboard in a JSON and voila !

charts: [
        {id:'chart1',
         width:800,height:250,

xAxis:{type:'Category',field: "Month",orderRule:'Date'},

@dbwest
dbwest / Gemfile
Last active Dec 23, 2015
An example script, and accompanying Gemfile, to use for automating the Chrome mobile browser on an Android device. Tested on OS X Mountain Lion. Appium installed using node for CLI. If you don't have a fast android emulator, try genymotion...
View Gemfile
source "http://rubygems.org"
gem 'watir-webdriver'
gem 'selenium-webdriver'
@willjohnson
willjohnson / README.md
Last active Apr 26, 2022
Server Status Widget for Dashing
View README.md

Description

A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.

Usage