Skip to content

Instantly share code, notes, and snippets.

View n0m4dz's full-sized avatar

Tseegii Tselmeg n0m4dz

View GitHub Profile
@n0m4dz
n0m4dz / app.coffee
Last active August 29, 2015 14:06
Angular + Laravel main module
'use strict'
$injector = angular.injector(['ng'])
$injector.invoke(($http, $rootScope, $log)->
$rootScope.$apply(->
$http.get("/api/server")
.then((o)->
app = angular.module 'app', []
app.constant 'CONFIGS',
@n0m4dz
n0m4dz / active_nav.coffee
Last active August 29, 2015 14:07
Angular current navigation highlight
'use strict'
app = angular.module 'app', []
app.run(($scope, $location)->
$scope.isActive = (path)->
if ($location.path().substr(0, path.length) is path)
if (path is "/" && $location.path() is "/")
return true
if (path is "/")
return false
<?php
private $model;
public function __construct()
{
$this->model = new Post;
}
public function getPosts($myCache) {
@n0m4dz
n0m4dz / LaracasaController.php
Last active August 29, 2015 14:08
Laracasa example
<?php
class LaracasaController extends BaseController
{
public function index() {
$result = Laracasa::getAlbum();
return View::make('picasa')->with('albumFeed', $result);
}
/**
* Created by n0m4dz on 2/06/15.
*/
var gulp = require("gulp"),
bower = require('main-bower-files'),
concat = require("gulp-concat"),
gulpFilter = require("gulp-filter"),
ngAnnotate = require("gulp-ng-annotate"),
uglify = require("gulp-uglify"),
minifycss = require("gulp-minify-css"),

Install OS X 10.10 Yosemite in VirtualBox

(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)

Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.

(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)

<html>
<head>
<script type="text/javascript">
window.PrintView = function(elem)
{
var content = document.getElementById(elem).innerHTML;
var mywindow = window.open('', 'my div', 'height=600,width=900');
mywindow.document.write('<html><head><title>my div</title>');
mywindow.document.write('</head><body >');
mywindow.document.write(content);
@n0m4dz
n0m4dz / chruby_ruby-build.sh
Created May 20, 2016 14:30 — forked from havenwood/chruby_ruby-build.sh
On Debian, Ubuntu, or Mint: install Ruby with chruby and ruby-build
# Install apt-get packages:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
# Install chruby:
cd
wget https://github.com/downloads/postmodern/chruby/chruby-0.2.3.tar.gz
tar -xzvf chruby-0.2.3.tar.gz
cd chruby-0.2.3
sudo make install
@n0m4dz
n0m4dz / README.md
Created July 14, 2016 12:13 — forked from denji/README.md
Remove settings and cli-links WebStorm; PhpStorm, PyCharm, RubyMine, AppCode, CLion, IntelliJ, 0xDBE10, Rider (OS X & macOS)

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s

Quick backup JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-backup.sh | bash -s