Skip to content

Instantly share code, notes, and snippets.

@Fl0pZz
Fl0pZz / browser_detect.js
Last active January 13, 2022 06:56 — forked from 2107/browser_detect.js
JavaScript: Detect Browser
// browser detect
var BrowserDetect = {
init: function(userAgent, appVersion) {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(userAgent) || this.searchVersion(appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function(data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
@John-Paul-R
John-Paul-R / FabricModList.md
Last active May 17, 2024 11:06
A list of (almost all) mods for Fabric

Fabric Mod List

This page contains a list of the current Minecraft Fabric mods. (As of 2021-08-19 08:05:23 Timezone: UTC+0000 (GMT))

To search for mods by name, category, or download count, visit the website, fibermc.com!

Note: You can view a mod's source files by following the "Source" link on its CurseForge page, assuming that the mod's creator has made such files public.

There are currently 2954 mods in this list.

@FlorianHeigl
FlorianHeigl / cheatsheets.md
Last active May 11, 2024 09:50
Printable Cheat Sheets for Software

A collection of links to useful cheat sheets.

Only what's properly printable can get a spot at the top of this list. It should also be small enough to fit on a few pages. almost all links in this document were designed by their creators so that YOU can print them in a good-looking format and store them however is best for you. Anything that isn't really something you could print in A4/UfS Letter format, but is still a well-made cheatsheet can get a spot at the end of the page.

Pleae contribute any you remember you've seen and liked. It would be wonderful if we can get these to be something more commonly made.

Search Engines

@moshmage
moshmage / withinRadius.js
Last active April 18, 2022 09:22
compares two objects lat/lon and returns true if within provided kms
/**
* is One Point within Another
* @param point {Object} {latitude: Number, longitude: Number}
* @param interest {Object} {latitude: Number, longitude: Number}
* @param kms {Number}
* @returns {boolean}
*/
function withinRadius(point, interest, kms) {
'use strict';
@evandroamparo
evandroamparo / WinMergeSourcetree.txt
Last active June 6, 2023 14:27
WinMerge with Sourcetree
Diff tool: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: "$LOCAL" "$REMOTE" -dl "Local" -dr "Remote"
Merge tool: C:\Program Files (x86)\WinMerge\WinMergeU.exe
Arguments: "$MERGED"
@tangzhen
tangzhen / promise-loop.js
Last active September 5, 2021 14:00
javascript promise while loop
'use strict';
// ref: http://blog.victorquinn.com/javascript-promise-while-loop
var q = require('bluebird');
var promiseWhile = function (condition, action) {
var resolver = q.defer();
var loop = function () {
@tomas-stefano
tomas-stefano / Capybara.md
Last active May 21, 2024 02:09
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
# proxying through apache to a local rails instance, http & https
# apache *.conf file
<VirtualHost *:80>
ServerName psl.localhost
ServerAlias cms.psl.localhost
ServerAlias *.psl.localhost
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/