Skip to content

Instantly share code, notes, and snippets.

Fotis Evangelou fevangelou

Block or report user

Report or block fevangelou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fevangelou
fevangelou / Disable autostart of the NCP Secure Entry Mac Client GUI application on a Mac.txt
Created May 7, 2012
Disable autostart of the NCP Secure Entry Mac Client GUI application on a Mac
View Disable autostart of the NCP Secure Entry Mac Client GUI application on a Mac.txt
To disable the autostart of the NCP Secure Entry Mac Client GUI application on a Mac, just edit the /Library/LaunchAgents/com.ncp-e.ncpmon.plist file and set the value "RunAtLoad" to "false" (from "true"). It's faster to do it via command-line, like this:
$ sudo nano /Library/LaunchAgents/com.ncp-e.ncpmon.plist
Then move the cursor right below the line containing "RunAtLoad" and change true to false.
Cmd+X, Y, Enter
Ready!
@fevangelou
fevangelou / Equal column heights with Mootools.js
Created Dec 12, 2012
Equal column heights with Mootools
View Equal column heights with Mootools.js
window.addEvent('domready', function(){
// Equal heights for all elements with "commonClassForEachBlock" class
if($$('.commonClassForEachBlock')){
var blocks = $$('.commonClassForEachBlock');
var maxHeight = 0;
blocks.each(function(item){
maxHeight = Math.max(maxHeight, parseInt(item.getStyle('height')));
});
blocks.setStyle('height', maxHeight);
@fevangelou
fevangelou / javascript_resources.md
Created Oct 29, 2013 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.
View javascript_resources.md

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@fevangelou
fevangelou / css_resources.md
Created Oct 29, 2013 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.
View css_resources.md

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@fevangelou
fevangelou / Timestamp in PHP for up to the minute changes.php
Created Jun 13, 2014
Timestamp in PHP for up to the minute changes
View Timestamp in PHP for up to the minute changes.php
<!-- Just because I'm bored to look at the PHP docs -->
<?php echo date('YmdHi'); ?>
@fevangelou
fevangelou / Easy-peasy folder sync on a Mac.sh
Last active May 22, 2019
Easy-peasy folder sync on a Mac
View Easy-peasy folder sync on a Mac.sh
#!/bin/bash
# USAGE:
# Save this file as whatever.command and make sure this file is executable.
# To make it executable, simply open up your Mac's terminal, cd to the folder
# where you've saved this file and then run: $ chmod +x whatever.command
#
# To execute the file, save it in your Desktop or Home folder and simply click on
# it whenever you want to sync these folders. Alternatively you could create a cron
# job to do this automatically for you.
View Backbone.js rewrite for Nginx.txt
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.html break;
}
}
@fevangelou
fevangelou / PHP rand() equivalent for JavaScript.js
Created Jun 13, 2014
PHP rand() equivalent for JavaScript
View PHP rand() equivalent for JavaScript.js
function rand(min, max){
return Math.floor(Math.random() * (max - min + 1)) + min;
}
@fevangelou
fevangelou / notepad.html
Created Jun 13, 2014 — forked from jdkanani/notepad.html
This bookmarklet gives you a code editor in your browser with a single click
View notepad.html
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@fevangelou
fevangelou / sort_array_of_objects.php
Last active Nov 5, 2015
Sort array of objects in PHP
View sort_array_of_objects.php
// Typical method
function cmp($a, $b)
{
return strcmp($a->name, $b->name);
}
usort($your_data, "cmp");
// For PHP 5.3+ (using closures)
usort($your_data, function($a, $b){
You can’t perform that action at this time.