Skip to content

Instantly share code, notes, and snippets.

View yacinehmito's full-sized avatar
👨‍🔧
Building stuff

Yacine Hmito yacinehmito

👨‍🔧
Building stuff
View GitHub Profile
@yacinehmito
yacinehmito / git.ts
Created November 1, 2025 07:22
Run git with node.js
async function git(args: string[]): Promise<string> {
const child = childProcess.spawn('git', args);
let stdout = '';
let stderr = '';
child.stdout.on('data', (data) => {
stdout += data;
});
child.stderr.on('data', (data) => {
List of packages that have been tested:
@angular/common
@angular/compiler
@angular/core
@angular/forms
@angular/http
@angular/platform-browser
@angular/platform-browser-dynamic
@angular/router
@yacinehmito
yacinehmito / vscode-guide.md
Last active October 2, 2017 13:53
VSCode guide for Ironhack

A new editor: Visual Studio Code

Visual Studio Code, shortened VSCode, is a source code editor by Microsoft. Released in April 2015, it has since enjoyed a surge of popularity among developpers.

First, let's get something out of the way: Visual Studio Code is not Visual Studio. The latter is a much older source code editor, also by Microsoft. Whereas Visual Studio Code is cross-platform, open source and relatively lightweight, Visual Studio is closed source, Mac & Windows only, and quite the beast.

For the upcoming lessons we highly encourage the use of VSCode instead of Atom.

@yacinehmito
yacinehmito / steps.md
Created July 21, 2017 15:30
Can't reach the Internet from a nixos-container

I did ip link show. It shows that my Ethernet interface is eno1.

To check, I did ping -c 3 -I eno1 8.8.8.8. It sends 3 packets to Google's server without an issue.

I wrote container.nix with:

{ config, lib, pkgs, ... }:

{
CREATE OR REPLACE FUNCTION QUENTIN_nb_medecins
n-med number, mois number, annee number
RETURN number
BEGIN
END QUENTIN_nb_medecins;
20:02:14    christiansen | what do we gain from splitting the CI stuff into many files?                                                                                                             │ amiller
20:02:30    christiansen | seems to me that we should prioritize keeping it fairly separate from the actual substance of the matter, which is Idris                                                 │ andreypopp
20:07:13            gpyh | I'd keep it in a single file                                                                                                                                             │ annalimo
20:07:18            gpyh | but with bash functions/subshells                                                                                                                                        │ apples
20:07:25            gpyh | that are called at the appropriate time                                                                                                                               

Regression and sanity tests Basic Basic 001: OK (4.95s) Basic 002: OK (2.08s) Basic 003: OK (2.41s) Basic 004: OK (2.20s) Basic 005: OK (2.23s) Basic 006: OK (4.38s) Basic 007: OK (1.79s) Basic 008: OK (2.18s)

Former run. The basic013 and primitives001 tests were removed because they crash on my system.

idris-0.11.2: test (suite: regression-and-sanity-tests)

basic001 finished...success
basic002 finished...success
basic003 finished...success
basic004 finished...success

Warnings when compiling (output of idris --build test_server.ipkg):

gcc -Wall -c test_server.c  
Type checking ./Test_server.idr
/run/user/1000/idris1957747793424238335.c: In function ‘_idris_Uv_46_lws_95_libuv_95_run’:
/run/user/1000/idris1957747793424238335.c:5618:5: warning: implicit declaration of function ‘lws_libuv_run’ [-Wimplicit-function-declaration]
     lws_libuv_run(GETPTR(LOC(0)),GETINT(LOC(1)));
     ^
/run/user/1000/idris1957747793424238335.c: In function ‘_idris_Uv_46_lws_95_libuv_95_stop’:
*** Downloading ‘https://cache.nixos.org/nar/0jlld4di2l1yygx6qnchv5kpvgar91lzqaiih57wh6n0vfwx7lc0.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/2rr29hdbf6dkqh4w566rkvfhqx0bwv21-hook’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 500 Internal Server Error
/nix/store/3f8pgnilmvhi8l01mgsfkrx8xp84l1dl-xz-5.2.2-bin/bin/xz: (stdin): File format not recognized
error: unexpected end-of-file
download of ‘https://cache.nixos.org/nar/0jlld4di2l1yygx6qnchv5kpvgar91lzqaiih57wh6n0vfwx7lc0.nar.xz’ failed: No such file or directory
could not download ‘/nix/store/2rr29hdbf6dkqh4w566rkvfhqx0bwv21-hook’ from any binary cache