(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <float.h> | |
int main | |
(int argc | |
,char *ac []){int i, count = argc - 1; | |
double * dvalues=malloc(01- 01+count* | |
sizeof(double)+1); double mi=DBL_MAX,ran=.0,ma =DBL_MIN,mo;for(i= 00; argc>1 | |
&&i<count;i=i+8-7) {double val = atof(ac[i+1]) ;if(23&&val<mi)mi= val;if(val |
#!/bin/bash | |
file=$1 | |
test -z $file && echo "file required." 1>&2 && exit 1 | |
git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all | |
git ignore $file | |
git add .gitignore | |
git commit -m "Add $file to .gitignore" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/* | |
a shader executes per pixel | |
so every thing you see here is he function for every pixel | |
raymarching is in principe a function that finds the closest point to any surface in the world | |
then we move our point by that distance and use the same function, | |
the function will probably be closer to an object in the world every time | |
and after about 40 to 200 iterations you'll either have found an object or | |
missed them all into infinity |
Leimi's note: removed lots of stuff from the original gist of scottjl, (thanks to him by the way!), as in the end some wasn't useful for me. If you are intestered, go check the gist revisions.
The KC60 is kinda like a premade GH60 that was first sold on Massdrop during summer 2015.
It runs on TMK firmware, or something based on it at least (not sure this is the real source for the keyboard but it seems it is), which means it's heavily programmable.
There is a GUI tool (the source of this tool seems to be here) and a command-line tool to ease up the process of programming the board.
**Go check this great article on Key
Want to use Nix for development but you're not sure how? Concerned about the
fluidity of nixpkgs
channels or not being able to easily install arbitrary
package versions?
When I first heard about Nix it seemed like the perfect tool for a developer. When I tried to actually use it for developing and deploying web apps, though, the pieces just didn't seem to add up.
// This is the canonical layout file for the Quantum project. If you want to add another keyboard, | |
// this is the style you want to emulate. | |
#include "planck.h" | |
#ifdef BACKLIGHT_ENABLE | |
#include "backlight.h" | |
#endif | |
// Each layer gets a name for readability, which is then used in the keymap matrix below. | |
// The underscores don't mean anything - you can have a layer called STUFF or any other name. |
{ | |
"red": { | |
"50": "#ffebee", | |
"100": "#ffcdd2", | |
"200": "#ef9a9a", | |
"300": "#e57373", | |
"400": "#ef5350", | |
"500": "#f44336", | |
"600": "#e53935", | |
"700": "#d32f2f", |
These two commands will minimise the diskspace used for the repo. Please note that Github, BitBucket run this all the time to minimise the diskspace. | |
Suggestion: Run as often as you can (i.e. once a week for small working-in-progress repo, one in every few days if many people work together). | |
It's no harm to run it often, cron or system task could be an option too. | |
# Clean unused commits | |
`git reflog expire --all --expire=now` | |
# Compact the disk by remove unneccesary files from the local git repository | |
`git gc --aggressive --prune=now` |
Window | |
---- | |
N new widnow | |
P new private window | |
W close window | |
o quick command # this is really helpful when used as key sequnce e.g. pressing o r d in sequence brings me to reddit immediately as 'o' to show quick command window and 'rd' is nickname of reddit in my bookmarks | |
+Esc Task Manager | |
E extensions | |
Y history | |
? keyboard cheatsheet |