Skip to content

Instantly share code, notes, and snippets.

View yukulele's full-sized avatar

Clément P yukulele

  • France
View GitHub Profile
@Hafthor
Hafthor / floatradix.js
Created April 10, 2021 23:45
non-decimal non-integer stuff
// like parseFloat, but takes an optional radix
function parseFloatWithRadix(s, r) {
r = (r||10)|0;
const [b,a] = ((s||'0') + '.').split('.');
const l1 = parseInt('1'+(a||''), r).toString(r).length;
return parseInt(b, r) +
parseInt(a||'0', r) / parseInt('1' + Array(l1).join('0'), r);
}
// like Number..toFixed, but takes an optional radix
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active April 24, 2024 12:12
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@1wheel
1wheel / geometry.js
Last active November 8, 2022 13:46
line-intersection
//creates new point
function P(x, y, color){
var rv
if (x.map){
rv = {x: x[0], y: x[1], color: 'black'}
} else{
rv = {x: x, y: y, color: color || 'black'}
}
rv.toString = function(){ return rv.x + ',' + rv.y }
rv.type = 'point'
@asciidisco
asciidisco / gist:5c0020f25d7d9dccc5c5
Created March 11, 2016 10:11
npm sass, autoprefixer, minifier, sourcemaps
"scripts" {
"styles:dev": "node-sass --source-map-embed --follow --output-style expanded src/styles/main.scss | postcss -u autoprefixer -u cssnano -o public/main.css --map file"
}
@wenchy
wenchy / Makefile
Last active January 16, 2024 15:36
Compile all .cpp files into one target under the current directory.
CC := g++
CFLAGS := -Wall -g
TARGET := test
# $(wildcard *.cpp /xxx/xxx/*.cpp): get all .cpp files from the current directory and dir "/xxx/xxx/"
SRCS := $(wildcard *.cpp)
# $(patsubst %.cpp,%.o,$(SRCS)): substitute all ".cpp" file name strings to ".o" file name strings
OBJS := $(patsubst %.cpp,%.o,$(SRCS))
all: $(TARGET)
@vgarvardt
vgarvardt / css.css
Created December 21, 2015 09:36
Pure CSS Star Wars opening crawl @ http://codepen.io/yukulele/pen/KsCIi
#target{
position:absolute;
top:-3500px;
bottom:0;
left:0;
right:0;
overflow:hidden;
font-size:30px;
text-align:center;
font-family:sans-serif;
@0XDE57
0XDE57 / config.md
Last active April 18, 2024 04:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@jhned
jhned / mza-snippet
Last active December 28, 2018 14:32
margin: 0 auto; gist for Emmet
{
"snippets": {
"css": {
"snippets": {
"mza": "margin: 0 auto;"
}
}
}
}
@jtdp
jtdp / gist:5443297
Last active March 13, 2024 12:58
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..