Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / p4merge-git-tool.md
Created December 21, 2016 02:10 — forked from dgoguerra/p4merge-git-tool.md
Setup p4merge as difftool and mergetool on Windows

Setting up p4merge as diff and merge tool on Windows. Tried for Git version 1.8.4.msysgit.0.

Two alternatives are explained: using the command line, and directly editing the config file.

Setting up from the command line

Being the installation path "C:Program Files\Perforce\p4merge.exe", just run:

$ git config --global diff.tool p4merge
// IT_working.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include <cstdlib>
#include <climits>
using namespace std;
class Solution {
public :
#!/usr/bin/python
import os, subprocess
import glob2
import glob
curr_dir = os.getcwd()
def initialize():
print("current directory: {0}".format(curr_dir))
init_cmd = "cd {0} && rm -rf testing && mkdir -p testing && touch testing/coverage.xml && echo 'coveragedata' >> testing/coverage.xml".format(curr_dir)
@Teino1978-Corp
Teino1978-Corp / README.md
Created July 7, 2016 04:19
Serialize an HTML Form to a JavaScript Object, supporting nested attributes and arrays.

jquery.serializeJSON

Adds the method .serializeJSON() to jQuery (or Zepto) that serializes a form into a JavaScript Object, using the same format as the default Ruby on Rails request params.

Install

Install with bower bower install jquery.serializeJSON, or npm npm install jquery-serializejson, or just download the jquery.serializejson.js script.

@Teino1978-Corp
Teino1978-Corp / gist:3a69a8fe1f804d31c2db343d893de52b
Created July 7, 2016 04:13
Serialize an HTML Form to a JavaScript Object, supporting nested attributes and arrays.
jquery.serializeJSON
====================
Adds the method `.serializeJSON()` to [jQuery](http://jquery.com/) (or [Zepto](http://zeptojs.com/)) that serializes a form into a JavaScript Object, using the same format as the default Ruby on Rails request params.
Install
-------
Install with [bower](http://bower.io/) `bower install jquery.serializeJSON`, or [npm](https://www.npmjs.com/) `npm install jquery-serializejson`, or just download the [jquery.serializejson.js](https://raw.githubusercontent.com/teinoboswell/jquery.serializeJSON/master/jquery.serializejson.js) script.
@Teino1978-Corp
Teino1978-Corp / AET.md
Created March 19, 2016 20:56
Attacking IPV6

Attacking IPV6

Rose Fragmentation Attack

The Rose Fragmentation Attack was conceived through a need to create disruption in a network. This attack is a combination of the SYN attack and the "Unknown" ICMP attack. The following link is for an in-depth analysis of the attack.

The Rose Fragmentation Attack

@Teino1978-Corp
Teino1978-Corp / walk.rb
Created February 18, 2016 18:33
Port of clojure.walk to Ruby
module Walk
refine Array do
def walk(inner_f, outer_f)
outer_f.(self.map(&inner_f))
end
end
refine Hash do
def walk(inner_f, outer_f)
@Teino1978-Corp
Teino1978-Corp / export_repo_issues_to_csv.py
Created February 18, 2016 18:13
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests

Timeline

Recurring app starts should bring the user back to where he left. The user should have context what he looked at when last using the app. That counts for the scroll position in the timeline and selected events.

Initial loading

Load a maximum of 100 events. Show the loading spinner until the events are loaded and display them all at once. Don’t show multiple spinners, just one! This happens only when the timeline is empty like the first time opening the app.

Pull to refresh

Drag down on timeline to update manually. Always fill the gap between last timestamp/event shown and most recent. Load a maximum of 100 events, if there are more events show a button “More Reports”.

Updating

AddonFrame.StateButtons = {
frame = CreateFrame("Frame", "Y_Buttons", AddonFrame),
buttonFrame = CreateFrame("Frame", "Y_Buttons_Container", AddonFrame),
buttons = { },
size = 36,
padding = 6,
SavePosition = function(self)
local point, _, rpoint, x, y = self.frame:GetPoint();