type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
// kills long running ops in MongoDB (taking seconds as an arg to define "long") | |
// attempts to be a bit safer than killing all by excluding replication related operations | |
// and only targeting queries as opposed to commands etc. | |
killLongRunningOps = function(maxSecsRunning) { | |
currOp = db.currentOp(); | |
for (oper in currOp.inprog) { | |
op = currOp.inprog[oper-0]; | |
if (op.secs_running > maxSecsRunning && op.op == "query" && !op.ns.startsWith("local")) { | |
print("Killing opId: " + op.opid |
/* | |
AnalogReadSerial | |
Reads an analog input on pin 0, prints the result to the serial monitor. | |
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground. | |
This example code is in the public domain. | |
Upload this to the Arduino using the Arduino IDE! | |
*/ |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
Please note: there is an APT package called "fonts-powerline" which is tested and working for Ubuntu 20.04 which achieves the same outcome. Try "sudo apt install fonts-powerline"
If you're using Z Shell and a special prompt theme designed with Powerline fonts in mind, you'll need to install them on your machine. These are the most clear and cut-down instructions that I've found to work with Ubuntu 16.10 (also confirmed working for 17.04, 17.10, 18.04, 19.10) and all credit goes to renshuki's Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme gist. I've extracted just the Powerline font instructions - my personal setup uses Prezto instead of Oh My ZSH (not included here).
cd ~
import math | |
def lairalgebriqueapproximationrectangle(): | |
A=input("Entrez la forme de la fonction avec variable x : ") | |
print('f(x)=',A) | |
n=int(input("Entrez le nombre de pas n ,de préference il doit etre grand : ")) | |
a=float(input("l'intervalle commence de : ")) | |
b=float(input("l'intervalle fini par : ")) | |
somme=0 | |
for k in range(0,n): | |
fonction='' |
/* | |
Instructions for MacOS: | |
- Install the fonts 'Operator Mono' & 'Fira Code' | |
- Install theme 'Dark Candy' | |
- Add the following config to the VS Code settings.json: | |
{ | |
"editor.renderWhitespace": "all", | |
"editor.fontSize": 14, |
From: https://www.jesgs.com/blog/2017/12/18/deploying-from-github-to-vps-using-travis-ci
Recently, I spent around 14 to 16 hours learning all of the necessary steps to getting an existing repo set up with Travis CI to run unit tests, and then once successful, connect to a remote server that isn't a PaaS (in this case, Linode) and then proceeds to use Git hooks to do post deployment things.
Starting with your local machine and you have your project already checked out from Github.
gem install travis
. This installs the Travis CI command-line tools. We're going to use these tools to encrypt RSA keys that Travis will use to connect to your remote server.import axios from 'axios' | |
import createAuthRefreshInterceptor from 'axios-auth-refresh' | |
const getCSRFToken = () => { | |
const token: HTMLMetaElement | null = document.head.querySelector( | |
'meta[name="csrf-token"]' | |
) | |
return token?.content | |
} |
emoteJAM
is a simple website that generates animated BTTV emotes from static images.
That idea is to apply a well established "meme meta filters" to static emotes. Such as JAM, Hop, etc.
The most important feature of the website is that it's completely client-side and can be easily deployed to something like GitHub Pages. It uses WebGL to animate static images and gif.js to generate actual GIF files inside of your browser.
The project is currently in development and not available to general public until it's more or less feature-complete.