Skip to content

Instantly share code, notes, and snippets.

@CharlesGrimont
CharlesGrimont / USRS2C-1.txt
Last active October 4, 2017 14:03
USRC2C cours1
1) APDU:
CLA INS P1 P LC DATA Le
1 2 3 4 5 6 7
1 = A0 => 00 (Pour notre propre applet on peut definir ce que l'on veux, sinon il y a des normes comme BC pour le domaine bancaire...)
2 = A4 Select 20 verification de code
3 = 00 04
4 = 00 => 01
5 = taille de données
6 = AID

These instructions were written Nov 2016. We are installing Ubuntu 16.10. They assume you are completely wiping any Windows installation and just installing Ubuntu.

Pull requests are very welcome.

  • Press F12 to enter BIOS setup
  • Secure Boot -> Secure Boot Enable -> Change from "Enabled" to "Disabled"
  • System Configuration -> SATA Operation -> Change from "RAID" to "AHCI"
  • Apply changes and restart.
ATS1523439287349(stack) {
let c8oPage : C8oPage = this;
let parent;
let scope;
let self;
let out;
let event;
let get = function(key) {let val=undefined;try {val=eval(ts.transpile('('+ key + ')'));}catch(e){c8oPage.c8o.log.warn("[MB] ATS1523439287349: "+e.message)}return val;}
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
@CharlesGrimont
CharlesGrimont / NativeAnimation
Last active July 6, 2018 20:15
React-native-fix
# Fix '#import <RCTAnimation/RCTValueAnimatedNode.h>'
# Add this to Podfile
post_install do |installer|
change_lines_in_file('../node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h') do |lines|
if lines[9].include?('#import <RCTAnimation/RCTValueAnimatedNode.h>')
lines[9].clear
lines.insert(9, '#import "RCTValueAnimatedNode.h"')
end
lines
@CharlesGrimont
CharlesGrimont / test.java
Last active August 13, 2018 11:53
Java test
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
@Test
public void C8oFsPutAttachment() throws Throwable {
final C8o c8o = get(Stuff.C8O_FS_PUSH);
synchronized (c8o) {
try {
// First reset
JSONObject json = c8o.callJson("fs://.reset").sync();
assertTrue(json.getBoolean("ok"));
@CharlesGrimont
CharlesGrimont / upload.ts
Created June 5, 2019 08:54
Upload file angular
import {HttpClient} from "@angular/common/http";
constructor(private http: HttpClient) {
}
public uploadFiles(url: string, from: any, headersObject: any){
// here headers
let headers = new HttpHeaders(headersObject);
const httpRequest = new HttpRequest('POST', url, form, {reportProgress: true, withCredentials: true, headers: headers});
import { NgModule, ErrorHandler } from '@angular/core';
import { HttpClient, HttpClientModule,HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { IonicApp, IonicModule, IonicErrorHandler, DeepLinkConfig } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';