Skip to content

Instantly share code, notes, and snippets.

View Aschen's full-sized avatar
💭
:trollface:

Adrien Maret Aschen

💭
:trollface:
View GitHub Profile
1) Configure interfaces
auto eth0
iface eth0 inet static
address 192.168.10.1
netmask 255.255.255.0
gateway 192.168.10.254
up route add -net 192.168.20.0 netmask 255.255.255.0 gw 192.168.10.254
@Aschen
Aschen / dump.java
Created May 11, 2016 11:50
Afficher Arbre
void dumpTree(int depth = 1, String indentation = "")
{
if (this->is_leaf)
{
System.out.println(indentation + "Node");
}
else
{
this->childrens[0].dumpTree(depth + 1, indentation + " ");
this->childrens[1].dumpTree(depth + 1, indentation + " ");
void EpsiFileCompressor::compress(const QString &folder, const QString &ecfFilename)
{
QWaitCondition waitCondition;
FilePool filepool(folder);
ZippedBufferPool zippedBufferPool(&waitCondition);
Zipper zipper1(&filepool, &zippedBufferPool);
Zipper zipper2(&filepool, &zippedBufferPool);
Writter writter(ecfFilename, &zippedBufferPool, &waitCondition);
@Aschen
Aschen / docker-compose.yml
Created March 22, 2018 13:11
Nunux Reader Authentication with Nginx
web:
build: .
ports:
- "56432:3000"
links:
- redis
environment:
- NODE_ENV=production
- APP_REDIS_URI=redis://redis:6379/5
- APP_EMBEDDED_DAEMONS=feed-updater

Keybase proof

I hereby claim:

  • I am aschen on github.
  • I am aschen93 (https://keybase.io/aschen93) on keybase.
  • I have a public key whose fingerprint is BAC9 39AC 6D76 00E9 5B79 FFF6 3FBD 61DB B3CC 7634

To claim this, I am signing this object:

@Aschen
Aschen / bash
Created April 3, 2018 16:42
Can't run standalone script : TypeError: fn is not a function
aschen@gman mns/Metacoin » truffle exec test.js
Using network 'development'.
TypeError: fn is not a function
at /home/aschen/.nvm/versions/node/v9.8.0/lib/node_modules/truffle/build/webpack:/~/truffle-require/require.js:128:1
at /home/aschen/.nvm/versions/node/v9.8.0/lib/node_modules/truffle/build/webpack:/~/truffle-require/require.js:101:1
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:532:3)
```
mkdir -p /home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/build/c
cd ../../ && go get ./... ; cd -
/home/aschen/projets/kuzzleio/sdk-go/internal/wrappers
/usr/local/go/bin/go build -o /home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/build/c/libkuzzlesdk.a -buildmode=c-archive ./cgo/kuzzle/
/usr/local/go/bin/go build -o /home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/build/c/libkuzzlesdk.so -buildmode=c-archive ./cgo/kuzzle/
mv -f /home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/build/c/libkuzzlesdk.h /home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/build/c/kuzzle.h
mkdir -p /home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/build/python
swig -Wall -c++ -python -py3 -outdir /home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/build/python -o kcore_wrap.cxx -I/home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/headers -I/home/aschen/go/src/github.com/kuzzleio/sdk-go/internal/wrappers/cpp -
<template>
<div>
<button @click="testMe()">Click Me</button>
</div>
</template>
<script>
import kuzzle from '@/kuzzle'
export default {
name: 'Test',
@Aschen
Aschen / application.js
Last active February 14, 2019 12:41
Import javascript class in the standard asset pipeline
// app/javascript/packs/application.js
import Foobar from '../foobar/foobar'
window.Foobar = Foobar
@Aschen
Aschen / dump-kuzzle-index.js
Created February 18, 2019 15:42
Export and import data from a Kuzzle index
const
fs = require('fs'),
mkdirp = require('mkdirp'),
{
Kuzzle,
WebSocket
} = require('kuzzle-sdk');
const kuzzle = new Kuzzle(
new WebSocket('localhost', {