Skip to content

Instantly share code, notes, and snippets.

@Hector1567XD
Hector1567XD / .gitlab-ci
Last active December 28, 2021 13:38 — forked from Slauta/.gitlab-ci
electron-updater from private repo gitlab.com (Fix Feed URL 20/05/2021)
variables:
VERSION_ID: '1.0.$CI_PIPELINE_ID'
stages:
- build
build:
image: slauta93/electron-builder-win
stage: build
artifacts:
@virbo
virbo / lempp.md
Last active June 21, 2024 17:58
Install Linux Centos 7, Nginx, MySQL, Postgres, PHP 8.0

Update LANG

Edit environtment vi /etc/environment add these lines...

LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@its-tayo
its-tayo / generator.js
Last active August 23, 2023 05:57
Faker.js: Generate array of N items
// generator
const generator = (schema, min = 1, max) => {
max = max || min;
return Array.from({
length: faker.random.number({
min,
max,
}),
}).map(() => {
const innerGen = (anySchema) => Object.keys(anySchema).reduce((entity, key) => {
@vades
vades / angular-expression-changed.md
Last active June 21, 2024 15:21
Fixing "Expression has changed after it was checked" in Angular

Fixing "Expression has changed after it was checked" in Angular

The exception appears (in the development mode) at the moment the value is checked and value is different of the updated value.

Error message example

AppComponent.html:1 ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: true'. Current value: 'ngIf: false'.
    at viewDebugError (core.js:20440)
    at expressionChangedAfterItHasBeenCheckedError (core.js:20428)
    at checkBindingNoChanges (core.js:20530)
@thoroc
thoroc / README.md
Last active June 21, 2024 12:57
Dockerizing all the things: Running Ansible inside Docker container

Automating things in software development is more than useful and using Ansible is one way to automate software provisioning, configuration management, and application deployment. Normally you would install Ansible to your control node just like any other application but an alternate strategy is to deploy Ansible inside a standalone Docker image. But why would you do that? This approach has benefits to i.a. operational processes.

Although Ansible does not require installation of any agents within managed nodes, the environment where Ansible is installed is not so simple to setup. In control node it requires specific Python libraries and their system dependencies. So instead of using package manager to install Ansible and it’s dependencies we just pull a Docker image.

By creating an Ansible Docker image you get the Ansible version you want and isolate all of the required dependencies from the host machine which potentially might break things in other area

@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active July 2, 2024 01:50
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@PCreations
PCreations / rxjs-diagrams.md
Last active January 18, 2024 08:52
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@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:
@chronon
chronon / ext.txt
Created February 18, 2017 15:38
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@CharlyJazz
CharlyJazz / XMLHttpRequest.js
Last active May 17, 2023 08:13
XMLHttpRequest injection load javascript script.
//Before </body> tag
<script>
var xhr = new XMLHttpRequest();
xhr.open("get", "cookbook.js", true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) {
var script = document.createElement("script");
script.type = "text/javascript";
script.text = xhr.responseText;