Skip to content

Instantly share code, notes, and snippets.

View manuelcoppotelli's full-sized avatar
👨‍💻

Manuel Coppotelli manuelcoppotelli

👨‍💻
View GitHub Profile
@kevin-smets
kevin-smets / README.md
Last active June 4, 2018 13:44
Install TensorFlow @ MacOS

Instructions

# Install python 3.x
brew ugrade python

# Install TF - see https://github.com/tensorflow/tensorflow/issues/17369
pip3 install grpcio==1.9.1 tensorflow
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active August 9, 2025 19:50
crack activate Office on mac with license file
@adamwathan
adamwathan / 1-add-macros.php
Last active June 11, 2022 19:55
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider
@aminnj
aminnj / download_video.py
Last active October 18, 2023 13:52
Download reddit-hosted videos/audio
import requests
import os
# change this url to the post's url
post_url = "https://www.reddit.com/r/holdmycatnip/comments/7vyada/hmc_so_i_can_drink_this_air_real_quick/"
# use UA headers to prevent 429 error
headers = {
'User-Agent': 'My User Agent 1.0',
'From': '[email protected]'
<?php
use ZipStream\ZipStream;
Route::get('/test', function () {
$tempStream = fopen('php://temp', 'w+');
$zipStream = new ZipStream(null, [ZipStream::OPTION_OUTPUT_STREAM => $tempStream]);
$zipStream->addFile('MyTextFile.txt', 'This is the contents.');
$zipStream->finish();
rewind($tempStream);
@grohiro
grohiro / autoload.php
Created June 23, 2017 06:02
An autoload.php for PHPUnit with Laravel 5+.
<?php
// Put me into tests/autoload.php
require_once __DIR__.'/../vendor/autoload.php';
try {
$env = env('APP_ENV');
$filename = sprintf(".env.%s", $env);
(new Dotenv\Dotenv(dirname(__DIR__), $filename))->load();
} catch (Dotenv\Exception\InvalidPathException $e) {
echo ".env for test is missing.";
<?php
use Illuminate\Contracts\Validation\Rule;
class ValidPaymentToken implements Rule;
{
private $gateway;
private $param1;
private $param2;
@stursby
stursby / README.md
Last active September 8, 2024 11:22
Vue + Firebase + Auth Demo

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@freak4pc
freak4pc / MKMultiPoint+Ext.swift
Last active September 5, 2024 06:36
Get a list of coordinates from a MKPolyline / MKRoute
public extension MKMultiPoint {
var coordinates: [CLLocationCoordinate2D] {
var coords = [CLLocationCoordinate2D](repeating: kCLLocationCoordinate2DInvalid,
count: pointCount)
getCoordinates(&coords, range: NSRange(location: 0, length: pointCount))
return coords
}
}
@laracasts
laracasts / vue-custom-input-component-exercise.js
Created January 9, 2017 18:16
vuecasts.com - Custom Input Components exercise.
Vue.component('coupon', {
props: ['code'],
template: `
<input type="text"
:value="code"
@input="updateCode($event.target.value)"
ref="input">
`,