Skip to content

Instantly share code, notes, and snippets.

🦀
You want to contact me? Come to miaou (https://miaou.dystroy.org) and ask for me

Canop Canop

🦀
You want to contact me? Come to miaou (https://miaou.dystroy.org) and ask for me
Block or report user

Report or block Canop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:93a030837272900d5796efde74c334e9
dys@tour-noire:~/dev/termimad> cargo tree
termimad v0.6.1 (/home/dys/dev/termimad)
├── crossbeam v0.7.2
│ ├── cfg-if v0.1.9
│ ├── crossbeam-channel v0.3.9
│ │ └── crossbeam-utils v0.6.6
│ │ ├── cfg-if v0.1.9 (*)
│ │ └── lazy_static v1.3.0
│ ├── crossbeam-deque v0.7.1
│ │ ├── crossbeam-epoch v0.7.2
View gist:6a267e586e5f912754305a91d53e2f45
# Code with semicolons:
use std::fmt;
use minimad::Text;
use crate::skin::MadSkin;
use crate::code;
use crate::line::FmtLine;
use crate::tbl;
View gist:9ac44f78b4aba0290978a9b5f26eb1b1
dys@tour-noire:~/dev/broot> cargo install cargo-crev
Updating crates.io index
Downloaded cargo-crev v0.7.0
Downloaded 1 crates (18.5 KB) in 1.64s
Installing cargo-crev v0.7.0
Downloaded crev-common v0.7.0
Downloaded serde_yaml v0.8.9
Downloaded crev-data v0.7.0
Downloaded flate2 v1.0.8
Downloaded common_failures v0.1.1
View gist:2c00267692fff59df254cc2f6da03c87
I am the Miaou user with id 4 and name "dystroy" on http://127.0.0.1:8204
@Canop
Canop / float.js
Last active May 16, 2018
float numbers formatting
View float.js
const float = function(v, p=2){
let absv = Math.abs(v);
if (absv>10**(p+3) || absv<10**-p) return v.toExponential(p).replace(/0+e/, 'e');
return v.toFixed(p).replace(/\.0+$|0+$/, '');
}
// run the following to test the float function and
// compare the values with common formatting functions
const bodys = [
View gist:5d0dc64cccaaff04ae2d15626217a596
function serie(start, max){
var arr = [];
for (var a = Math.ceil(456/100)*100; a ??? ; a ???) arr.push(a);
return arr;
}
console.log(serie(456, 2000));
View Miaou-Canop
I am the Miaou user with id 2 and name "Canop" on https://dystroy.org/miaou
View test.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View rest.js
import world from './world.js';
class Query {
// Generic Stuff
constructor(){
this._path = 'rest';
this._body = null;
}
View Public Tribo Games
{"type":"Tribo","status":"finished","players":[{"name":"meow","id":449},{"id":838,"name":"Cebolla"}],"scores":[52,48],"moves":"U¯V°WM®§aN¨OE¦\u009FYT\u009ES\u009D­R¬Q«\\ªf_´`jik[¾É]gpÓyÞqßr|êh}ë~\u0088éèxç\u0082Òd"}
{"type":"Tribo","status":"finished","players":[{"name":"CS-","id":1226},{"id":819,"name":"Retsam"}],"scores":[46,54],"moves":"TÂUÃS]ÄËIhºK°¥J@6ÀRµH«>?=¿¾¦<§\u009CrÊ|qÔÉÞ{Ï\u0085}sijaè7\u00925-Ùtã±~\u0088²»¼ÆílävåÇwªm"}
{"type":"Tribo","status":"finished","players":[{"name":"Retsam","id":819},{"id":1226,"name":"CS-"}],"scores":[56,44],"moves":"UÂ_ÍKTÌjËÖ×V`atáÕßâ\x7FìuÁ\u0089IÀµR¿JH«¢@6¡5£\u0098*\u0097+\u008DS"}
{"type":"Tribo","status":"finished","players":[{"name":"CS-","id":1226},{"id":687,"name":"Unihedron"}],"scores":[47,53],"moves":"T¹_º^»®`hS¯RI°¥¦¤\u009AÅ?kÎiØsg}âë|\u0099\u0086\u0098¢H¡\\GF ÆvÇìlíÑ\u0080uÛã\u008B\u008Eå\u008A"}
{"type":"Tribo","status":"finished","players":[{"name":"Unihedron","id":687},{"id":1226,"name":"CS-"}],"scores":[63,37],"moves":"T¹^ÃJi¯ÌjËkaÊÀWI¶°Hs±Ö}|º{X¦¥Y?
You can’t perform that action at this time.