Skip to content

Instantly share code, notes, and snippets.

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

Gil gfelot

🏠
Working from home
  • Epitech
  • Bordeaux
View GitHub Profile
Verifying that +gfelot is my blockchain ID. https://onename.com/gfelot
@gfelot
gfelot / nginx_plex.conf
Created February 10, 2016 23:33 — forked from spikegrobstein/nginx.conf
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
@gfelot
gfelot / Book.swift
Last active March 14, 2016 16:04
WIMY - Gloss PB
//
// Book.swift
// WIMB
//
// Created by Gil Felot on 10/01/16.
// Copyright © 2016 gfelot. All rights reserved.
//
import Foundation
import UIKit
@gfelot
gfelot / LibraryViewController.swift
Last active March 18, 2016 12:05
Swift CollectioView
//
// LibraryViewController.swift
// WIMB
//
// Created by Gil Felot on 16/03/16.
// Copyright © 2016 gfelot. All rights reserved.
//
import UIKit
import Parse
@gfelot
gfelot / LibraryViewController.swift
Created March 18, 2016 15:03
Array in an async task
//
// LibraryViewController.swift
// WIMB
//
// Created by Gil Felot on 16/03/16.
// Copyright © 2016 gfelot. All rights reserved.
//
import UIKit
import Parse
@gfelot
gfelot / LibraryTableViewController.swift
Created March 21, 2016 10:07
Library make it break
//
// LibraryTableViewController.swift
// WIMB
//
// Created by Gil Felot on 18/03/16.
// Copyright © 2016 gfelot. All rights reserved.
//
import UIKit
import Parse
@gfelot
gfelot / BookTableViewCell.swift
Last active March 27, 2016 15:49
Custom TableViewCell
//
// BookTableViewCell.swift
// WIMB
//
// Created by Gil Felot on 27/03/16.
// Copyright © 2016 gfelot. All rights reserved.
//
import UIKit
if let coverString = myBookFromJSON?.data["cover"] as! String! {
if let url = NSURL(string: coverString) {
print(url)
let imgView = UIImageView()
imgView.pin_setImageFromURL(url)
print(imgView.image)
headerView = ParallaxHeaderView.parallaxHeaderViewWithImage(imgView.image, forSize: CGSizeMake(self.tableview.frame.size.height, 300)) as! ParallaxHeaderView
self.tableview.tableHeaderView = headerView
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let indexPath = tableView.indexPathForSelectedRow!
let currentCell = tableView.cellForRowAtIndexPath(indexPath) as! BookTableViewCell
titleToEdit = currentCell.titleLabel.text!
labelToEdit = currentCell.subtitleLabel.text!
funcNb = indexPath.row
deselectAllRows()
performSegueWithIdentifier("editRow", sender: nil)
}
@gfelot
gfelot / grunt.pig
Last active May 2, 2016 16:00
Udemy Hadoop Error with PIG exercice
grunt> STORE top10 INTO 'output/pig/avg-volume' USING PigStorage(',');
2016-05-02 14:38:00,588 [main] INFO org.apache.pig.tools.pigstats.ScriptState - Pig features used in the script: GROUP_BY,ORDER_BY,FILTER,LIMIT
2016-05-02 14:38:00,623 [main] INFO org.apache.pig.newplan.logical.optimizer.LogicalPlanOptimizer - {RULES_ENABLED=[AddForEach, ColumnMapKeyPrune, DuplicateForEachColumnRewrite, GroupByConstParallelSetter, ImplicitSplitInserter, LimitOptimizer, LoadTypeCastInserter, MergeFilter, MergeForEach, NewPartitionFilterOptimizer, PartitionFilterOptimizer, PushDownForEachFlatten, PushUpFilter, SplitFilter, StreamTypeCastInserter], RULES_DISABLED=[FilterLogicExpressionSimplifier]}
2016-05-02 14:38:00,649 [main] INFO org.apache.hadoop.conf.Configuration.deprecation - mapred.textoutputformat.separator is deprecated. Instead, use mapreduce.output.textoutputformat.separator
2016-05-02 14:38:00,653 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 6000:
<line 7, column 0> Output Location Validation Failed f