du -h /home | sort -hr | head -n 20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const s = [ | |
"ApiAuthTypeFacebook", | |
"ApiAuthTypeGoogle", | |
"ApiAuthTypeLinkedIn", | |
"ApiAuthTypeGithub", | |
]; | |
function getAbbreviationFromStartSimilarity(s: string[]) { | |
let match = ""; | |
for (const n of s) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
struct GLCoordinates { | |
static constexpr glm::vec3 topLeft = {-1.0,1.0f,0.0f}; | |
static constexpr glm::vec3 topRight = {1.0,1.0f,0.0f}; | |
static constexpr glm::vec3 bottomLeft = {-1.0f,-1.0f,0.0f}; | |
static constexpr glm::vec3 bottomRight = {1.0f,-1.0f,0.0f}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <openssl/aes.h> | |
#include <openssl/ssl.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
/** | |
* Interestingly enough, using `iv` and `userKey` directly will | |
* result in corrupted encrypted data, so we need to copy iv and userKey to temporary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-list --all | xargs git grep "pattern" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/chap26.html#vertexpostproc-viewport | |
The viewport transformation is determined by the selected viewport’s width and height in pixels, px and py, respectively, and its center (ox, oy) (also in pixels), as well as its depth range min and max determining a depth range scale value pz and a depth range bias value oz (defined below). The vertex’s framebuffer coordinates (xf, yf, zf) are given by | |
xf = (px / 2) xd + ox | |
yf = (py / 2) yd + oy | |
zf = pz × zd + oz | |
The viewport parameters shown in the above equations are found from these values as | |
ox = x + width / 2 | |
oy = y + height / 2 | |
oz = minDepth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No protocol specified | |
qt.qpa.xcb: could not connect to display :0 | |
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. | |
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. | |
Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install libgtk-3-dev git meson sassc | |
git clone https://github.com/ubuntu/yaru.git | |
cd yaru | |
meson build | |
cd build | |
sudo ninja install | |
sudo cp -rv /usr/share/gnome-shell/theme/Yaru /usr/share/themes/Yaru/gnome-shell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('jsx_extension_is_bad',function() { | |
gulp | |
.src('./src/**/*.jsx') | |
.pipe(rename({extname: '.js'})) | |
.pipe(gulp.dest('./src', {pwd: './'})); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getNextNode(current, selector){ | |
if(current && current.nodeType != Node.ELEMENT_NODE && current.nextSibling) { | |
return getNextNode(current.nextSibling, selector); | |
} | |
if(current && current.nextSibling && !current.matches(selector)){ | |
return getNextNode(current.nextSibling, selector); | |
} | |
if(current.nodeType != Node.ELEMENT_NODE) { | |
return null; |
NewerOlder