Skip to content

Instantly share code, notes, and snippets.

@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active May 8, 2024 03:50
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@eliotsykes
eliotsykes / cloud9-postgresql-rails-howto.md
Last active December 20, 2021 13:28
How to setup PostgreSQL & Rails on Cloud9

How to setup PostgreSQL & Rails on Cloud9

At time of writing, Cloud9 has PostgreSQL pre-installed, so you won't need to install it yourself. However, its not running by default, so you will need to start it with this command in the terminal:

sudo service postgresql start

Change the PostgreSQL password to 'password' (or choose a different password):

@jessejiang0214
jessejiang0214 / RoundBorderDatePicker.cs
Last active October 8, 2022 09:42
This is the Xamarin Forms date picker extension. It can set border width, color and radius, also it can add PlaceHolder and MinimumAge
using System;
using Xamarin.Forms;
namespace MyApp
{
public interface ICanBeValidated
{
Action<bool> ValidateChange { get; set; }
bool IsValidated { get; set; }
@iyhammad
iyhammad / mycontroller.ts
Created January 24, 2016 20:02
Sample Angular TypeScript Controller that use ABP generated defenitions
module app.views.employee.basicInformation {
export class add {
private employee: any;
private addEntry: () => void;
private isValidBusinessData: boolean;
private directorates: Array<any>
private departments: Array<any>;
private units: Array<any>;
private locations: Array<any>;
@brobertsaz
brobertsaz / serversetup.md
Last active January 4, 2016 18:28
Ubuntu Precise Rails, Nginx, Unicorn and Capistrano ('2.15.5') Server Setup

Ubuntu Precise Rails, Nginx, Unicorn and Capistrano ('2.15.5') Server Setup

I originally tried to use the ~> 3.0 version of Capistrano, but fell back to the 2.15.5 version. There were a lot of changes in the new version that I did not feel like learning right at the moment...

1. Setup deploy user

First we will create a new user for deployment:

$ ssh into your server

@KittyGiraudel
KittyGiraudel / main.scss
Last active April 5, 2022 19:11
From: Architecturing a Sass project
// Sass utilities
@import "helpers/variables";
@import "helpers/functions";
@import "helpers/mixins";
@import "helpers/placeholders";
// Vendors and external stylesheets
@import "vendors/bootstrap";
@import "vendors/jquery-ui";
@plentz
plentz / nginx.conf
Last active May 17, 2024 09:08
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@shazron
shazron / ios7.phonegap.cordova.js
Last active December 23, 2015 07:39
PhoneGap / Apache Cordova - top margin for iOS 7
// Pre-requisites:
// 1. Device core plugin
// 2. Splashscreen core plugin (3.1.0)
// 3. config.xml: <preference name="AutoHideSplashScreen" value="false" />
// 4. config.xml: <preference name="DisallowOverscroll" value="true" />
function onDeviceReady() {
if (parseFloat(window.device.version) >= 7.0) {
document.body.style.marginTop = "20px";
// OR do whatever layout you need here, to expand a navigation bar etc
# /etc/nginx/sites-enabled/berlin
upstream spree.ryanbigg.com {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
# for UNIX domain socket setups:
server unix:/tmp/berlin.socket fail_timeout=0;
}
@tagrudev
tagrudev / yolo
Last active May 13, 2017 13:51
YOLO practices #RubyOnRails
# Do not refactor, it is a bad practice. YOLO
# Not understanding why or how something works is always good. YOLO
# Do not ever test your code yourself, just ask. YOLO
# No one is going to read your code, at any point don't comment. YOLO
# Why do it the easy way when you can reinvent the wheel? Future-proofing is for pussies. YOLO