Skip to content

Instantly share code, notes, and snippets.

View NiGhTTraX's full-sized avatar
🌶️

Andrei Picus NiGhTTraX

🌶️
View GitHub Profile
@NiGhTTraX
NiGhTTraX / dji.sh
Created July 29, 2023 20:50
Script to fix DJI drone video timestamps so they don't show up as taken in 1970 when importing into Adobe Lightroom
# Copy the DCIM folder from the SD card first.
exiftool -v0 -progress -overwrite_original \
"-CreateDate<FileModifyDate" \
"-ModifyDate<FileModifyDate" \
"-TrackCreateDate<FileModifyDate" \
"-TrackModifyDate<FileModifyDate" \
"-MediaCreateDate<FileModifyDate" \
"-MediaModifyDate<FileModifyDate" \
"-FileCreateDate<FileModifyDate" \
DCIM/**/*.MP4
{
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"entryFile": "examples/nestjs/src/main"
}
module.exports = {
experimental: {
externalDir: true,
},
};
{
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"webpack": true
}
}
module.exports = {
webpack: (config) => {
// Let Babel compile outside of src/.
const tsRule = config.module.rules.find(
(rule) => rule.test && rule.test.toString().includes("tsx|ts")
);
tsRule.include = undefined;
tsRule.exclude = /node_modules/;
return config;
@NiGhTTraX
NiGhTTraX / test-output.md
Last active June 19, 2019 10:25
Mugshot failing result
Expected Actual Diff
expected actual diff
@NiGhTTraX
NiGhTTraX / mugshot.spec.ts
Last active June 19, 2019 10:25
Visual test with Mugshot
import Mugshot from 'mugshot';
import WebdriverIOAdapter from '@mugshot/webdriverio';
describe('Mugshot README', () => {
/* BROWSER SETUP */
/* Identical setup from previous example omitted.
/* ENDBROWSER SETUP */
it('should have a logo', async () => {
await browser.url('https://github.com/NiGhTTraX/mugshot/blob/master/README.md');
@NiGhTTraX
NiGhTTraX / test.spec.ts
Last active June 19, 2019 10:25
Simple example of a browser test using Mocha, Chai and WebdriverIO
import { remote } from 'webdriverio';
import { expect } from 'chai';
import { describe, it, before, after } from 'mocha';
describe('Mugshot README', () => {
/* BROWSER SETUP */
let browser!: ReturnType<typeof remote>;
before(async () => {
const options = {
export function vit(
name: string,
definition: () => Promise<any>,
selector:string = '#root > *'
) {
it(name, async () => {
await definition();
const result = await mugshot.check(name, selector);
expect(result.matches).to.be.true;
it('should delete the todo when using the delete button', function() {
const Delete = createSpy();
const onDeleteSpy = spy();
render(<Todo Delete={Delete} name="buy milk" onDelete={onDeleteSpy} />);
Delete.lastProps.onSubmit();
expect(onDeleteSpy).to.have.been.called;
});