Skip to content

Instantly share code, notes, and snippets.

View FrancescoBorzi's full-sized avatar
🏳️‍🌈
Live and let live

Francesco Borzì FrancescoBorzi

🏳️‍🌈
Live and let live
View GitHub Profile
@Mohamed3on
Mohamed3on / batchPrettier.md
Last active April 5, 2024 17:03
Run prettier on all JS files in a directory
  1. Install prettier
  2. Make a .prettierignore file, and add directories you'd like prettier to not format, for example: **/node_modules
  3. Run prettier --write "**/*.js" *Don't forget the quotes.
  4. Optional: if you want to format JSON/SCSS files too, replace js with json/scss.
@Quramy
Quramy / README.md
Last active September 4, 2020 17:24
Performance Angular unit testing

Performance of unit testing Angular app

I'm loving Angular, but running unit tests on Karma gets my nerves. It's too slow for me.

In this post, I explain mechanics under Angular's testing module and how to improve the performance.

What makes my tests slow?

To evaluate Angular unit testing performance I captured the CPU profiling with running Karma.

@gregarendse
gregarendse / Testing An Angular CLI Project in a Headless Environment.md
Last active May 20, 2019 03:51
Testing An Angular CLI Project in a Headless Environment

Testing An Angular CLI Project in a Headless Environment

I recently started a new project and we used [Angular CLI][4] to get started. Angular CLI, as in the name, is a command line utility for creating and managing Angular 2 projects. Using Angular CLI to create a project is very easy and it gives you a great starting point for new Angular 2 projects. The only draw back I found was that in my mind it wasn't CI ready.

Angular CLI out of the box gives you a few unit tests and an end to end (e2e) test. This is great because you can generate a project and set up your build server to build the artefacts. This is where I ran into problems.

Having everything generated for you is great until something you want to do does not work; and this is where I was. I wanted to build and test my angular application on a headless build agent. The generated code from Angular CLI runs tests using Google Chrome by default. Which is fine, but running Google Chrome on a bui

@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active July 7, 2024 15:31
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@Naios
Naios / TaskSchedulerExamples.md
Last active September 4, 2019 12:08
Task Scheduler usage examples

TaskScheduler guide for TrinityCore Scripting

The TaskScheduler was introduced in commit TrinityCore/TrinityCore@da77a90 and TrinityCore/TrinityCore@151a0f5 as a better alternative to eventmap.

It is adapted to the current needs of scripting which means scheduling of event between a random range, schedulling with readable std::chrono constants, repeating of events and more.

See this script for a short usage example

Basic Usage

@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active May 25, 2024 20:19
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@rob-murray
rob-murray / add_intellij_launcer
Last active June 28, 2024 03:21
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ
@kaku87
kaku87 / parent.html
Created July 22, 2013 08:48
javascript popup close callback event.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Popup Example</title>
</head>
<body>
<script>
function popupCallback(str){
alert("This is callback:" + str);
}
@bubenkoff
bubenkoff / checkpoint.sh
Last active February 14, 2024 21:38
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
#
# Usage: ./checkpoint.sh
#
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
# Or, make an Automator action and paste the script.
@shreeshga
shreeshga / gist:1627145
Created January 17, 2012 15:45
md5sum through brew
brew install md5sha1sum