Skip to content

Instantly share code, notes, and snippets.

View d0nkeyBOB's full-sized avatar
💭
on a mission to learn all things

Rich d0nkeyBOB

💭
on a mission to learn all things
  • Self Employed
  • 14:30 (UTC -12:00)
View GitHub Profile
@rotty3000
rotty3000 / resource.html
Created September 28, 2011 19:30
embed a portlet via js
#set ($articleService = $portal.getClass().forName('com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil'))
#set ($article = $articleService.getArticle($getterUtil.getLong($groupId), $reserved-article-id.data))
$le-content.data
<div id="${request.portlet-namespace}discussion">
<script type="text/javascript">
AUI().use('liferay-portlet-url', 'aui-resize-iframe', function(A) {
var portletURL = Liferay.PortletURL.createRenderURL();
@vojtajina
vojtajina / all-templates.html
Created August 15, 2012 00:00
AngularJS: load all templates in one file
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>
@p1nox
p1nox / postgresql_configuration_on_ubuntu_for_rails.md
Last active July 20, 2024 11:55
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
@aaronksaunders
aaronksaunders / index.html
Created May 14, 2013 02:50
SampleKinveyApp Application using AngularJS and Kinvey
<!doctype html>
<html ng-app="sampleKinveyApp">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@steinn
steinn / slack_random.sh
Last active December 16, 2020 17:51
Post random number from random.org to a channel on Slack
#!/bin/bash
RANDOM_URL=http://www.random.org/integers/?num=1\&min=1\&max=100\&col=1\&base=10\&format=plain\&rnd=new
RND_NUMBER=$(curl $RANDOM_URL)
MESSAGE=$RND_NUMBER
USERNAME="random.org"
CHANNEL="#random"
PAYLOAD="payload={\"channel\": \"$CHANNEL\", \"username\": \"$USERNAME\", \"text\": \"$MESSAGE\"}"
@staltz
staltz / introrx.md
Last active July 25, 2024 16:52
The introduction to Reactive Programming you've been missing
@ctechols
ctechols / Page.vim
Last active May 15, 2018 10:48
Capture output from a vim command (like :version or :messages) into a split scratch buffer.
"Examples:
":Page version
":Page messages
":Page ls
"It also works with the :!cmd command and Ex special characters like % (cmdline-special)
":Page !wc %
"Capture and return the long output of a verbose command.
function! s:Redir(cmd)
let output = ""
redir =>> output
@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@TreyCai
TreyCai / Recommanded_mac_apps.md
Last active April 19, 2024 16:10
Recommanded Mac OS X Apps
TODO: Add price informations
TODO: Add App Store Addresses

System Tools


###Chrome

One browser for your computer, phone and tablet

@DavidWells
DavidWells / language-list.txt
Created September 15, 2014 20:59
List of all language abbreviations for localization purposes
<label>French (France)</label> <value>fr_FR</value>
<label>Romanian (Romania)</label> <value>ro_RO</value>
<label>Portuguese (Brazil)</label> <value>pt_BR</value>
<label>Hebrew (Israel)</label> <value>he_IL</value>
<label>Ukrainian</label> <value>uk</value>
<label>German (Germany)</label> <value>de_DE</value>
<label>Italian (Italy)</label> <value>it_IT</value>
<label>Russian (Russia)</label> <value>ru_RU</value>
<label>Dutch (Netherlands)</label> <value>nl_NL</value>
<label>Hungarian (Hungary)</label> <value>hu_HU</value>