testing vim-gist
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
From b0a9156259c1ff9f1a0d42a86e08250e37248a0b Mon Sep 17 00:00:00 2001 | |
From: James Brink <[email protected]> | |
Date: Thu, 27 Dec 2018 04:50:56 -0700 | |
Subject: [PATCH] Updated output_files function to prevent segfault. | |
I have updated the output_files function in patch.c to gracefully | |
handle the following scenario. | |
Given a git style patch like the following. |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
Usage: | |
instagram_auto_accept [options] | |
Options: | |
-h, --help Show this help screen. | |
-s, --sleep=<interval> How long to sleep between polling default 60 seconds | |
-t, --throttle=<interval> How long to sleep betwen accepts |
requires stoken
Very basic and naive, not sure how to capture the vpn dialog window so we use a sleep
👍
Hint, PIN aka $1
could be included into function risking some security.. not much though.
¯\_(ツ)_/¯
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
# Misc useful docker commands for use on dev env | |
# Clean up all stopped containers | |
docker ps -a|cut -d " " -f 1|grep -v CONTAINER|xargs docker rm | |
# Clean up all images | |
docker images |awk '{print $3'}|grep -v IMAGE|xargs docker rmi |
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
# Enable VMware guests to have 3d acceleration with bumblbee setups on linux. Use this if you are received the popup messages about no 3d support in guests and you are using bumblebee with optimus or primusrun | |
echo "mks.gl.allowBlacklistedDrivers = TRUE" >> ~/.vmware/preferences | |
optirun vmware |
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
t = document.querySelectorAll('.transactionRowPrice'); total = 0; for (i=0; i < t.length; i++){ var price = t[i].innerHTML.replace(/\$|[a-zA-Z]+/gi, ''); if (price != '') {total += parseInt(price)}; } |
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 ruby | |
# Simple script to pull down all the repositories of a github user | |
require 'net/http' | |
require 'json' | |
@github_api_base_uri = 'https://api.github.com/users' | |
def get_repos(username,page) | |
uri = URI.parse("#{@github_api_base_uri}/#{username}/repos") | |
uri.query = URI.encode_www_form({:page => page}) |
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 ps -a|grep -v "CONTAINER ID"|awk '{print $1}'|xargs docker rm && docker images|grep -v REPOSITORY|awk '{print $3'}|xargs docker rmi |
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
CloudMD::Application.routes.draw do | |
resources :users | |
resources :patients do | |
resources :addresses | |
resources :phones | |
end | |
match 'user_sessions/authenticated', :controller=>'user_sessions', :action=>'authenticated', :via => 'get' |