Skip to content

Instantly share code, notes, and snippets.

View mavimo's full-sized avatar
⌨️
coding

Marco Vito Moscaritolo mavimo

⌨️
coding
View GitHub Profile
<?php
class FileContentCounter
{
private $file;
public function __construct($file)
{
$this->file = $file;
}
@mavimo
mavimo / brew.sh
Created February 14, 2016 15:52
mavimo's mac setup
#!/bin/sh
# Tap required repos
brew tap blackfireio/blackfire
brew tap caskroom/cask
brew tap caskroom/versions
brew tap homebrew/dupes
brew tap homebrew/fuse
brew tap homebrew/php
brew tap homebrew/versions
marco@nebula ~ $ ping google.com
PING google.com (216.58.212.110): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
64 bytes from 216.58.212.110: icmp_seq=0 ttl=55 time=3247.303 ms
64 bytes from 216.58.212.110: icmp_seq=1 ttl=55 time=3249.586 ms
64 bytes from 216.58.212.110: icmp_seq=3 ttl=55 time=2876.964 ms
64 bytes from 216.58.212.110: icmp_seq=4 ttl=55 time=1980.436 ms
64 bytes from 216.58.212.110: icmp_seq=6 ttl=55 time=1248.177 ms
@mavimo
mavimo / gitlab-phpci.diff
Last active January 21, 2018 03:14
phpci-gitlab-integration
diff --git a/app/models/project.rb b/app/models/project.rb
index 3391431..e88c73e 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -55,6 +55,7 @@ class Project < ActiveRecord::Base
# Project services
has_many :services
has_one :gitlab_ci_service, dependent: :destroy
+ has_one :phpci_ci_service, dependent: :destroy
has_one :campfire_service, dependent: :destroy
@mavimo
mavimo / 0_reuse_code.js
Created January 1, 2014 20:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url={{ page.refresh_to_post_id }}.html" />
</head>
</html>
---
layout: default
title: Projects
generator: pagination
pagination:
max_per_page: 3
provider: projects
use:
- projects
---
{
"name": "mavimo/blog",
"description": "Mavimo's Blog",
"type": "sculpin-skeleton",
"authors": [
{
"name": "Marco Vito Moscaritolo",
"email": "marco@mavimo.org",
"homepage": "http://www.mavimo.org"
},
---
layout: default
title: Projects
generator: pagination
pagination:
max_per_page: 3
use:
- sculpin_projects
---
<h2>Projects</h2>
@mavimo
mavimo / 0_reuse_code.js
Created November 5, 2013 10:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console