Skip to content

Instantly share code, notes, and snippets.

Note: This was originally contributed by @mdunisch, @webintoit, and @cwramsey.

It may be moved back on to the Sails website at a future date; I'm just removing it until there's time to break down the "Hosting" section into individual pages. (If anyone's interested in helping w/ that, please send a PR to sails-docs!)

-mike

Deploying a Sails/Node.js application to OpenShift

To deploy to OpenShift, you'll need to make some minor modifications to your configuration:

@jayluxferro
jayluxferro / facebook-contact-info-summary.rb
Created March 24, 2018 13:41 — forked from dylanmckay/facebook-contact-info-summary.rb
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@jayluxferro
jayluxferro / getLastRSSFeed.html
Created March 13, 2018 12:21 — forked from juanbrujo/getLastRSSFeed.html
Get and display last feed from RSS using JavaScript (jQuery)
<html>
<head></head>
<body>
<div class="noticia">CARGANDO</div>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script>
$(function(){
var url = 'https://noticias.cumplo.cl/index.xml';
var news = $('.noticia');
@jayluxferro
jayluxferro / wpa_supplicant.conf
Created January 18, 2018 11:27
Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. I used this to connect to my university's wireless network.
# Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file.
# I used this to connect to my university's wireless network on Arch linux.
# Here's the command I used:
#
# wpa_supplicant -i wlan0 -c ./wpa_supplicant.conf
#
network={
ssid="YOUR_SSID"
scan_ssid=1
@jayluxferro
jayluxferro / backup.php
Created January 5, 2018 12:40 — forked from menzerath/backup.php
PHP: Recursively Backup Files & Folders to ZIP-File
<?php
/*
* PHP: Recursively Backup Files & Folders to ZIP-File
* MIT-License - Copyright (c) 2012-2017 Marvin Menzerath
*/
// Make sure the script can handle large folders/files
ini_set('max_execution_time', 600);
ini_set('memory_limit','1024M');
@jayluxferro
jayluxferro / ufw.md
Last active November 12, 2017 11:19 — forked from kimus/ufw.md
NAT and FORWARD with Linux's ufw firewall

Install UFW

if ufw is not installed by default be sure to install it first.

$ sudo apt-get install ufw

NAT

@jayluxferro
jayluxferro / gist:48715b2ec4be8d39bcf9b24c36feaaa6
Created October 16, 2017 22:27 — forked from philipn/gist:5274197
Running Ubuntu on a Macbook Air

Running Ubuntu on a Macbook Air

You don't have to be a slave to OS X! Here's a guide to a sane dual-booting setup with Ubuntu 12.10 on your shiny MacBook Air. This is written and tested for a MacBook Air 5,2 (Mid 2012), but likely works the same with any modern Macbook.

Install according to instructions at this URL:

https://www.freebsdfoundation.org/freebsd/how-to-guides/installing-a-desktop-environment-on-freebsd/
@jayluxferro
jayluxferro / file.php
Created September 9, 2017 05:48 — forked from bainternet/file.php
a Simple class to convert number to words in php based on http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/
<?php
//simple class to convert number to words in php based on http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/
if ( !class_exists('NumbersToWords') ){
/**
* NumbersToWords
*/
class NumbersToWords{
public static $hyphen = '-';
public static $conjunction = ' and ';
@jayluxferro
jayluxferro / Arduino Song
Created August 22, 2017 00:22 — forked from eznj/star_wars.ino
Arduino Star Wars Song for Piezo
**/
const int c = 261;
const int d = 294;
const int e = 329;
const int f = 349;
const int g = 391;
const int gS = 415;
const int a = 440;
const int aS = 455;