Skip to content

Instantly share code, notes, and snippets.

@noder123
noder123 / laravel_queue.conf
Last active January 24, 2017 05:29 — forked from danharper/a.md
Laravel Queue Supervisor
[program:laravel_queue]
command=/usr/local/bin/run_queue.sh
autostart=true
autorestart=true
stderr_logfile=/var/log/laraqueue.err.log
stdout_logfile=/var/log/laraqueue.out.log
@noder123
noder123 / script.js
Last active October 25, 2016 16:50
Vue.JS - Advanced Data Grid Component
Vue.filter("groupBy", function(value, key) {
var groups = {
data: value
};
if (key) {
groups = {};
for (var i = 0; i < value.length; i++) {
var row = value[i];
var cell = row[key];
@noder123
noder123 / DbmigrateController.php
Created February 9, 2016 06:19 — forked from bruceoutdoors/DbmigrateController.php
Laravel 4 Convert existing MySQL database to migrations. This is a fork of Christopher Pitt's work http://laravelsnippets.com/snippets/convert-an-existing-mysql-database-to-migrations, which is based off michaeljcalkins's work at http://paste.laravel.com/1jdw#sthash.0nEgQzQR.dpuf. His original source code doesn't really work out of the box in my…
<?php
/* * **
*
* This script converts an existing MySQL database to migrations in Laravel 4.
*
* 1. Place this file inside app/controllers/
*
* 2. In this file, edit the index() method to customize this script to your needs.
* - inside $migrate->ignore(), you pass in an array of table
  1. Install and configure Postgres [https://library.linode.com/databases/postgresql/ubuntu-12.04-precise-pangolin]
  2. Download latest stable version of plv8 [https://code.google.com/p/plv8js/wiki/PLV8]
  3. Extract plv8.zip and cd into it.
  4. sudo apt-get install subversion
  5. sudo make static
  6. Copy plv8.so to /usr/lib/postgres/9.1/lib
  7. Copy plv8--(version).sql and plv8.control to /usr/share/postgres/9.1/extension
  8. psql -d dbName
  9. CREATE EXTENSION plv8;
  10. Repeat 6-8 for plls (livescript) and plcoffee (coffeescript) if required
@noder123
noder123 / ApiClient.java
Created April 3, 2015 11:56
Using RetroFit in Android apps
import retrofit.RestAdapter;
/**
* Created by NODER on 3/4/2015.
*/
public class ApiClient {
private static UserApiInterface userApiInterface;
public static RestAdapter getRestAdapter(){
return DemoApplication.getInstance().getRestAdapter();
public class MainActivity extends
private PopupWindow popWindow;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.ListView;
import android.support.v4.app.ListFragment;
import com.nineoldandroids.animation.Animator;
import com.nineoldandroids.animation.ObjectAnimator;
package fr.android.test.emptylistview;
import java.util.ArrayList;
import java.util.HashMap;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.SimpleAdapter;