It will check if current branch is master, then ask a confirmation, in case of master
branch
Articles with initial info: https://dev.ghost.org/prevent-master-push/, https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook
It will check if current branch is master, then ask a confirmation, in case of master
branch
Articles with initial info: https://dev.ghost.org/prevent-master-push/, https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook
states: [ | |
{ 'AC': 'Acre' }, | |
{ 'AL': 'Alagoas' }, | |
{ 'AP': 'Amapá' }, | |
{ 'AM': 'Amazonas' }, | |
{ 'BA': 'Bahia' }, | |
{ 'CE': 'Ceará' }, | |
{ 'DF': 'Distrito Federal' }, | |
{ 'ES': 'Espírito Santo' }, | |
{ 'GO': 'Goías' }, |
# use ImageMagick convert | |
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
/** | |
* class for limiting the rate of function calls. | |
* Thanks to Pat Migliaccio. | |
* see https://medium.com/@pat_migliaccio/rate-limiting-throttling-consecutive-function-calls-with-queues-4c9de7106acc | |
* @example let l = new limit(); let logMessageLimited = l.throttleAndQueue(msg => { console.log(msg); }, 500); | |
*/ | |
class limit{ | |
public callQueue = [] | |
/** |
#!/bin/bash | |
## Script to merge all mp4 videos in current directory (recursively 2 levels) | |
## And update chapter marks to retain the folder/filename | |
## Script for merging videos | |
filename=`basename pwd` | |
current=`pwd` |
Memoization is a somewhat fraught topic in the React world, meaning that it's easy to go wrong with it, for example, by [making memo()
do nothing][memo-pitfall] by passing in children to a component. The general advice is to avoid memoization until the profiler tells you to optimize, but not all use cases are general, and even in the general use case you can find tricky nuances.
Discussing this topic requires some groundwork about the technical terms, and I'm placing these in once place so that it's easy to skim and skip over:
hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.
3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.
I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:
By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k