Skip to content

Instantly share code, notes, and snippets.

View macroramesh6's full-sized avatar
:octocat:

Ramesh Murugesan macroramesh6

:octocat:
View GitHub Profile
@DTrejo
DTrejo / .gitignore
Created April 4, 2011 03:32
How to Readline - an example and the beginnings of the docs
node_modules/
@jankorbel
jankorbel / dabblet.css
Created April 8, 2012 10:39
CSS animated loading dots
/*
CSS animated loading dots
*/
body
{
background: #5A5C64;
}
.loading_dots
@enjalot
enjalot / cors_server.py
Created June 10, 2012 06:19
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@ahoereth
ahoereth / meteor_reactive_var.html
Last active July 29, 2017 18:10
Minimal meteor reactive variable example. http://meteorpad.com/pad/kajGdYLfTrEkE5NtL
<template name="meteor_reactive_var">
<div>{{count}}</div>
<button>Increment Count</button>
</template>
@tdpreece
tdpreece / simple_http_server.sh
Created September 25, 2015 16:38
Running a Python SimpleHTTPServer in the background and killing it when doneSimpleHTTPServer
#!/usr/bin/env bash
# Create a page in the current dir
echo "My Test Page" > test.html
# Start server
python -m SimpleHTTPServer 8000 &> /dev/null &
pid=$!
# Give server time to start up
@RinatMullayanov
RinatMullayanov / Dockerfile
Last active August 1, 2023 22:13
Ubuntu Node.js Dockerfile
#
# Ubuntu Node.js Dockerfile
#
# https://github.com/dockerfile/ubuntu/blob/master/Dockerfile
# https://docs.docker.com/examples/nodejs_web_app/
#
# Pull base image.
FROM ubuntu:14.04
@lukasvan3l
lukasvan3l / blogpost_oauth_meteor_jimmy.md
Last active August 5, 2022 07:50
Any OAuth login service ever created, added to your app within 5 minutes

Adding any OAuth login to your Meteor app

tl;dr: Copy the q42:accounts-microsoft and q42:microsoft package, modify the URLs and service name and it works! Probably anyway...

When creating a commercial application with a wide target audience, you can stumble upon users wanting to login using an unknown and barely used OAuth service. And why deny your users this when you can easily create a login service package?

With only about 400 million active users and only 2nd place as world most valuable brand it makes sense that no developer has created an implementation to log in with your Microsoft account. But believe it or not, some people like logging in with their Microsoft Account. And so, by building on the the default meteor google and [accounts-google](https://atmospherejs.com/me

@bahmutov
bahmutov / Docker shell commands.sh
Last active February 9, 2024 07:55
A personal cheat sheet for running local Node project in a Docker container
# See list of docker virtual machines on the local box
$ docker-machine ls
NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1
# Note the host URL 192.168.99.100 - it will be used later!
# Build an image from current folder under given image name
$ docker build -t gleb/demo-app .
@simonw
simonw / how-to.md
Last active March 26, 2024 23:21
How to create a tarball of a git repository using "git archive"