Skip to content

Instantly share code, notes, and snippets.

View foxted's full-sized avatar
🦊

Valentin Prugnaud foxted

🦊
View GitHub Profile
@foxted
foxted / .gitignore_global
Created February 28, 2017 01:49
WF Global .gitignore
.DS_Store
.idea
node_modules/
vendor/
.env

Keybase proof

I hereby claim:

  • I am foxted on github.
  • I am valentinprugnaud (https://keybase.io/valentinprugnaud) on keybase.
  • I have a public key whose fingerprint is 2133 23D4 942D 03A3 83BC 20CC B939 EEA0 1C28 0C94

To claim this, I am signing this object:

@foxted
foxted / load.js
Last active December 5, 2016 22:33
$(window).ready(function() {
if($(this).width() > 1404) {
loadDiv2();
}
});
@foxted
foxted / validate-url.js
Last active June 29, 2020 03:31
Validate a URL to add http if needed (VueJS)
validateUrl() {
let regex = /^(http|https)/;
if(this.url.length > 3 && !this.url.match(regex)) {
this.url = 'http://' + this.url;
}
}
@foxted
foxted / mysite.conf
Created April 30, 2016 12:05
Force https with nginx
server {
listen 80;
server_name mysite.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
@foxted
foxted / gulpfile.js
Created November 4, 2015 06:26
Vueify
elixir.config.js.browserify.transformers.push({
name: 'vueify'
});
elixir(function(mix) {
mix.browserify('main.js');
});
elixir.Task.find("browserify").watch("resources/**/*.vue");
@foxted
foxted / RouteServiceProvider.php
Created October 30, 2015 04:41
Read routes from any PHP file in app/Http/Routes folder.
<?php
namespace NW\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
@foxted
foxted / RedirectIfInsecure.php
Created October 19, 2015 08:26
Cloudflare flexible SSL detection in Laravel
<?php
namespace App\Http\Middleware;
use Closure;
class RedirectIfInsecure
{
/**
* Handle an incoming request.
@foxted
foxted / nginx.conf
Last active October 19, 2015 08:37
nginx SSL
server {
server_name .example.com;
return 301 $scheme://www.example.com$request_uri;
}
@foxted
foxted / index.php
Created December 10, 2014 02:04
Max in array of objects
<?php
class Temperature{
private $temperature;
public function __construct($value){
$this->temperature = $value;
}