Skip to content

Instantly share code, notes, and snippets.

View geoom's full-sized avatar
🏠
Working from home

George Mejia geoom

🏠
Working from home
View GitHub Profile
@floudet
floudet / ssh-chroot-jail.sh
Created June 19, 2016 11:57
Chroot Jail for SSH Access
# Chroot Jail for SSH Access
# Tested on Ubuntu 14.04.2 LTS and Debian GNU/Linux 8 (jessie)
# Reference : http://allanfeid.com/content/creating-chroot-jail-ssh-access
#
# Had to add/change several things to make it work, including:
# - create lib64 folder
# - copy whoami dependencies that ldd doesn't show to fix 'I have no name!'
# in the customized prompt + create passwd file
#
@maryokhin
maryokhin / social_login.py
Created June 24, 2014 17:06
DRF + python-social-auth
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.generics import ListAPIView
from rest_framework.response import Response
from rest_framework.reverse import reverse
from rest_framework.settings import api_settings
from social.apps.django_app.utils import strategy
from social.backends.oauth import BaseOAuth1, BaseOAuth2
@bennadel
bennadel / index.htm
Created February 28, 2013 14:23
Grouping Nested ngRepeat Lists In AngularJS
<!doctype html>
<html ng-app="Demo" ng-controller="DemoController">
<head>
<meta charset="utf-8" />
<title>
Grouping Nested ngRepeat Lists In AngularJS
</title>
</head>
<body>
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@twilson63
twilson63 / testing_with_mocha.md
Created November 25, 2011 22:06
Mocha, Should and Sinon

http://visionmedia.github.com/mocha/

Mocha is a new library from VisionMedia aka TJ Holowaychuk author of ExpressJs. As usual it has everything you can think of from a testing library and manages to keep it simple and straight forward to use.

Just like jasmine it has a very solid bdd style to testing: