Skip to content

Instantly share code, notes, and snippets.

View nivv's full-sized avatar
💯

Albin N nivv

💯
  • Karabin AB
  • Sweden
  • 01:59 (UTC +02:00)
View GitHub Profile
@nivv
nivv / particle-waves-with-three-js.markdown
Created December 10, 2022 11:58
Particle Waves with three.js
@nivv
nivv / pep
Created March 28, 2022 10:07
cd /home/forge/.oh-my-zsh/custom
sudo -Hu forge git init
sudo -Hu forge git remote add origin https://github.com/nivv/operator-theme.git
sudo -Hu forge git fetch
sudo -Hu forge git checkout -t origin/master
sudo -Hu forge sed -i -e 's/ZSH_THEME="robbyrussell"/ZSH_THEME="operator"/g' /home/forge/.zshrc
sudo -Hu forge echo "source /home/forge/.oh-my-zsh/custom/aliases" >> /home/forge/.zshrc
sudo -Hu forge echo 'eval "$(fasd --init auto)"' >> /home/forge/.zshrc
,
@nivv
nivv / penis.md
Last active March 23, 2017 08:37
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
@nivv
nivv / Articles.js
Last active May 9, 2016 19:05
Retry request vue-resource
fetchArticles: function() {
this.$http.get({url: '/api/v2/articles'}).then( (response) => {
// success callback
this.$set('articles', response.data.data);
this.$set('appReady', true);
}, (response) => {
if (response.status == 401) {
//Seems like token is expired, refresh and retry
console.log('Should see if we can refresh the token!')
auth.handle(response);
@nivv
nivv / inline.js
Last active April 28, 2016 10:23
foo.vue
<template>
<gphe-header></gphe-header>
<div class="container-fluid main" v-if="!loading" transition="drag">
<h1>{{translate('title')}}</h1>
{{ currentPage.template.uuid }}
</div>
<script type="text/javascript">alert('heye')</script>
<gphe-footer :show-related="true" :tag-name="parent.name" :tags="parent.children"></gphe-footer>
</template>
@nivv
nivv / ohnoes.js
Created April 14, 2016 05:09
ohnoes.js
//Fel
id="”product-trigger”"
//Rätt
id="product-trigger"
@nivv
nivv / FilesController.php
Created March 14, 2016 10:42
serve download contents
public function downloadFile($id)
{
$file = File::findOrFail($id);
$contents = \Illuminate\Support\Facades\Storage::getDriver()->get('/'.$file->path);
return response()->download($contents, $file->name);
}
@nivv
nivv / snappy-light-nivv.tmTheme
Created January 26, 2016 10:06
snappy-light-edited
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Dmitri Voronianski (http://pixelhunter.me)</string>
<key>colorSpaceName</key>
<string>sRGB</string>
<key>gutterSettings</key>
<dict>