Skip to content

Instantly share code, notes, and snippets.

View bboydflo's full-sized avatar
🎯
be nice 👍

Florin Cosmin bboydflo

🎯
be nice 👍
  • Denmark
View GitHub Profile
@bboydflo
bboydflo / jquery.spin.js
Last active August 29, 2015 14:14 — forked from nzy/jquery.spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.

If you are using backbone (and backbone.marionette) in a browserify managed project, you will likely run into issues with underscore (at least if you manage your dependencies with npm). Each package, that has underscore as a dependency, will require its own version of underscore (making your bundle file contain multiple versions of underscore). Back in the days, you could shim backbone and underscore like:

browserify({
	shim: {
		'underscore': {
			path: './node_modules/underscore/underscore.js',
			exports: '_'
 },
@bboydflo
bboydflo / Default (OSX).sublime-keymap
Created May 3, 2016 16:46 — forked from radum/Default (OSX).sublime-keymap
Sublime Text 3 Configuration Files
[
{ "keys": ["ctrl+pagedown"], "command": "next_view" },
{ "keys": ["ctrl+pageup"], "command": "prev_view" }
]
@bboydflo
bboydflo / ios-version.js
Created May 31, 2016 07:24 — forked from Craga89/ios-version.js
JavaScript iOS version detection
/*
* Outputs a float representing the iOS version if user is using an iOS browser i.e. iPhone, iPad
* Possible values include:
* 3 - v3.0
* 4.0 - v4.0
* 4.14 - v4.1.4
* false - Not iOS
*/
var iOS = parseFloat(
@bboydflo
bboydflo / .babelrc
Last active December 2, 2019 14:16 — forked from bdchauvette/.babelrc
[Minimal node and babel boilerplate] minimal node and babel boilerplate #webdev
{
"presets": [ "es2015" ]
}
@bboydflo
bboydflo / 0_reuse_code.js
Created September 26, 2016 10:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var intValue = boolValue | 0;
@bboydflo
bboydflo / keybase.md
Created February 20, 2017 13:26
keybase verification for github

Keybase proof

I hereby claim:

  • I am bboydflo on github.
  • I am bboydflo (https://keybase.io/bboydflo) on keybase.
  • I have a public key ASDJYHa14gKh8tXGloCqEzkrCYuPUskpBf7azB2KzmLmFAo

To claim this, I am signing this object:

@bboydflo
bboydflo / Bluetooth.java
Last active November 21, 2019 12:49 — forked from cnbuff410/Bluetooth.java
Legacy Bluetooth(pre 4.0) connection code for Android #android #java #bluetooth
package xx.xx.xx.xx;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.UUID;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
@bboydflo
bboydflo / global_npm_packages_list.txt
Created April 6, 2017 09:06
get a list of globally/locally installed npm packages
// source: http://stackoverflow.com/questions/13981938/print-a-list-of-all-installed-node-js-modules#26312493
npm -g ls --depth=0
// or locally (omit -g) :
npm ls --depth=0