Skip to content

Instantly share code, notes, and snippets.

View xdemocle's full-sized avatar
🐢
Working from home

Rocco Russo xdemocle

🐢
Working from home
View GitHub Profile
# This is a sample build configuration for Other.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image:
name: pxdeployment/pipelines
username: $DOCKERHUB_USER_ALT
password: $DOCKERHUB_PASS_ALT
email: xxx@xxx.de
Verifying my Blockstack ID is secured with the address 1Cppqfu9zB9gnK7HPU9kNobvH9pc5T5zLX https://explorer.blockstack.org/address/1Cppqfu9zB9gnK7HPU9kNobvH9pc5T5zLX
@xdemocle
xdemocle / sites-available_angularjs_html5
Created December 15, 2016 20:15 — forked from demisx/sites-available_angularjs_html5
Nginx config for HTML5 AngularJS applications
server {
listen 8000;
server_name localhost;
root /Users/dmoore/projects/tutorials/angular-phonecat2/.build;
access_log "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.access.log";
error_log "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.error.log";
error_page 404 /app/404.html;
error_page 403 /app/403.html;
@xdemocle
xdemocle / local_routing.php
Created August 17, 2016 23:43
Local routing for PHP debug built-in server
<?php
// routing.php
if (preg_match('/\.(?:png|jpg|jpeg|gif|svg|html)$/', $_SERVER["REQUEST_URI"])) {
$isNotInPublicFoler = preg_match('/^((?!app|css).)*$/s', $_SERVER["REQUEST_URI"]);
if ($isNotInPublicFoler) {
$file_requested = $_SERVER["DOCUMENT_ROOT"] . $_SERVER["REQUEST_URI"];
} else {
$file_requested = str_replace('/public', '', $_SERVER["DOCUMENT_ROOT"]) . $_SERVER["REQUEST_URI"];
@xdemocle
xdemocle / README.MD
Last active April 5, 2017 17:01
GIT Common troubleshooting

#GIT Common troubleshooting

##How to cancel a local git commit

Just use git reset without the --hard flag:

git reset HEAD~1
@xdemocle
xdemocle / script_encapsulated.js
Created August 31, 2015 13:22
Encapsulated JS Scripts examples
/**
* Encapsulated JS Scripts
*/
(function (window, angular, Hammer) {
'use strict';
function exampleFunction (element) {
return 'something';
}
@xdemocle
xdemocle / Linux Static IP
Last active August 29, 2015 14:14 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi or nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
# Retrieve the current MAC address with: ifconfig
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
1. replace @ with $
Find: @
Replace: $
2. replace mixins
Find: \.([\w\-]*)\s*\((.*)\)\s*\{
Replace: @mixin \1\(\2\)\n{
3. replace includes
Find: \.([\w\-]*\(.*\)\s*;)
/* ==========================================================================
Section comment block
========================================================================== */
/* Sub-section comment block
========================================================================== */
/**
* Short description using Doxygen-style comment format
*
@xdemocle
xdemocle / javascript_resources.md
Created June 25, 2014 15:12 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

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