Skip to content

Instantly share code, notes, and snippets.

View parzibyte's full-sized avatar
💻
Coding

Parzibyte parzibyte

💻
Coding
View GitHub Profile
@parzibyte
parzibyte / SomeFragment.java
Created June 20, 2017 17:35 — forked from joshdholtz/SomeFragment.java
Android Google Maps V2 - MapView in XML
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);
@parzibyte
parzibyte / controller.js
Created November 11, 2016 00:07 — forked from BobNisco/controller.js
onLongPress AngularJS Directive - Great for mobile!
// Somewhere in your controllers for this given example
// Example functions
$scope.itemOnLongPress = function(id) {
console.log('Long press');
}
$scope.itemOnTouchEnd = function(id) {
console.log('Touch end');
}
@parzibyte
parzibyte / bf.php
Created July 7, 2016 17:40 — forked from apisurfer/bf.php
Simple brute force or string matching in PHP
<?php
/**
This is a simple proof of concept of a brute force algorithm for string matching with
given set of characters.
The way this works is that the algorithm counts from first to last possible combination of
given characters. Instead of counting(incrementing) in number base 10 we use
a new base which is derived from your set of possible characters (we count in symbols).
So if your characters list contains 27 characters the program actually counts in a 27 base
number system.