Skip to content

Instantly share code, notes, and snippets.

View aprilandjan's full-sized avatar
👻
wandering

May aprilandjan

👻
wandering
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active April 18, 2024 21:45
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is still a new situation. There is a lot we don't know. We don't know if there are more possible exploit paths. We only know about this one path. Please update your systems regardless.

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

@theevilbit
theevilbit / screenshot.m
Last active April 19, 2024 07:55
Make a screenshot on macOS using Objective-C
/*
Compile:
gcc -framework Foundation -framework AppKit screenshot.m -o screenshot
*/
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
int main(void) {
@rishitells
rishitells / Jest_GitLab_CI.md
Last active March 30, 2024 09:34
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@dosentmatter
dosentmatter / index.js
Created August 29, 2019 18:14
`antd` `@ant-design/icons` cherry-pick
// Affix
// Alert
export { default as CheckCircleOutline } from '@ant-design/icons/lib/outline/CheckCircleOutline';
export { default as CloseCircleOutline } from '@ant-design/icons/lib/outline/CloseCircleOutline';
export { default as CloseOutline } from '@ant-design/icons/lib/outline/CloseOutline';
export { default as ExclamationCircleOutline } from '@ant-design/icons/lib/outline/ExclamationCircleOutline';
export { default as InfoCircleOutline } from '@ant-design/icons/lib/outline/InfoCircleOutline';
// Avatar
@deejayy
deejayy / CustomModuleLoader.ts
Last active September 21, 2022 20:26
Solves the problem with typescript->javascript compilation and module path aliases (compilerOptions.paths).
import customModuleLoader = require('module');
export class CustomModuleLoader {
public cOptions: any = require('../tsconfig.json').compilerOptions;
public replacePaths: any = {};
constructor() {
Object.keys(this.cOptions.paths).forEach(alias => {
this.replacePaths[alias.replace(/\*.?/, '(.*)')] = this.cOptions.paths[alias][0].replace(/\*.?/, '$1');
@Slauta
Slauta / .gitlab-ci
Last active March 18, 2024 16:53
electron-updater from private repo gitlab.com
variables:
VERSION_ID: '1.0.$CI_PIPELINE_ID'
stages:
- build
build:
image: slauta93/electron-builder-win
stage: build
artifacts:
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 17, 2024 01:21
Hyperlinks in Terminal Emulators
@aklap
aklap / fix-missing-libcrypto-osx.md
Created October 17, 2016 04:25
Resolving missing link to libcrypto/openssl on OSX
@nikita-graf
nikita-graf / decode-electron-crash-reporter-dump.md
Last active September 6, 2023 10:33
How to decode Electron crash dump

Here are steps to decode Electron crashReporter dump on macOS:

  1. Download and install breakpad
  2. Download *-symbols.zip for your Electron release
  3. Setup a simple express app:
const app = require('express')();
const path = require('path');
const fs = require('fs');
const multer = require('multer');
@sid24rane
sid24rane / udp.js
Created July 25, 2016 08:39
Simple UDP Client and Server in Node.js ==> ( Echo Server )
var udp = require('dgram');
// --------------------creating a udp server --------------------
// creating a udp server
var server = udp.createSocket('udp4');
// emits when any error occurs
server.on('error',function(error){
console.log('Error: ' + error);