Skip to content

Instantly share code, notes, and snippets.

View efstathiosntonas's full-sized avatar

Efstathios Ntonas efstathiosntonas

View GitHub Profile
@mbeaty
mbeaty / gist:1261182
Created October 4, 2011 08:54
Google Maps fit bounds on marker and re-set zoom level
// addMarker() is just a method that creates a marker and adds it to a marker array; it returns
// the marker it just added.
var bounds = new google.maps.LatLngBounds();
var markerPos = addMarker(point.latitude, point.longitude).getPosition()
bounds.extend(markerPos);
map.fitBounds(bounds);
map.setZoom(14);
@P7h
P7h / IntelliJ_IDEA__Perf_Tuning.txt
Last active October 21, 2024 01:10
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@favila
favila / ci_lower_bound.sql
Last active July 24, 2022 17:41 — forked from anonymous/ci_lower_bound.sql
MySQL stored functions for calculating confidence intervals using Wilson scores: more precisely "Lower bound of Wilson score confidence interval for a Bernoulli parameter". Includes a P(qn) function (inverse normal distribution). See http://www.evanmiller.org/how-not-to-sort-by-average-rating.html This describes a way to rank items based on a ve…
# Francis Avila 2009-07-04
# See http://www.evanmiller.org/how-not-to-sort-by-average-rating.html
# These functions calculate "Lower bound of Wilson score confidence interval for a Bernoulli parameter"
# Two stored functions:
# CI_LOWER_BOUND(pos, trials, confidence) calculate a wilson score given POS positive votes in TRIALS number of trials
# PNORM(qn) calculate P(qn) (inverse normal distribution); needed by CI_LOWER_BOUND
delimiter ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ci_lower_bound`(pos INTEGER, trials INTEGER, confidence DOUBLE) RETURNS double
NO SQL
@manute
manute / gist:5451435
Last active October 25, 2023 19:28
my zsh config with oh-my-zsh
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
#JAVA_HOME
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
#MAVEN
export M2_HOME=/usr/local/maven-3.0.5
export MAVEN_OPTS=-Xmx1024m
@AlexPashley
AlexPashley / mixins.scss
Created July 5, 2013 14:44
SASS: Mixins for CSS
/* MIXINs */
@mixin transition( $val : ease 0.5s ) {
-webkit-transition: $val;
-moz-transition:$val;
-o-transition:$val;
-ms-transition:$val;
transition:$val;
}
@mixin text-shadow( $top: 3px, $left: 3px, $blur: 3px , $colour: #333 ) {
@steveosoule
steveosoule / html-canvas-file-upload-local-storage.html
Created July 11, 2013 23:28
JavaScript Image Upload, Canvas, and Local Storage Example
<!-- http://tech.pro/tutorial/1383/javascript-one-language-to-rule-them-all -->
<style>
[for=blue] { color: blue; }
[for=green] { color: green; }
[for=red] { color: red; }
</style>
<input id="uploadImage" type="file" name="photo" />
<input id="caption" type="text" name="caption" placeholder="caption" />
<label for="blue">Blue</label>
@rosswd
rosswd / multi-git-win.md
Last active November 9, 2024 17:31
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
@wbroek
wbroek / genymotionwithplay.txt
Last active November 8, 2024 01:24
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active August 3, 2024 16:45
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@xbeta
xbeta / README.md
Last active October 1, 2024 22:47
Macbook Pro Bluetooth + WiFi 2.4GHz interference fix for Mavericks