Skip to content

Instantly share code, notes, and snippets.

@Asjas
Asjas / reset.css
Created May 19, 2021 07:09
Modern CSS Reset - Andy Bell
// https://piccalil.li/blog/a-modern-css-reset
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
@glibg10b
glibg10b / .md
Created December 15, 2023 11:48
Access hidden Huawei router settings

Huawei reuses the same interface for many of their routers, but chooses to hide some features. Some of these may not be supported by the hardware, but others may work fine.

The features are hidden using the HTML hidden attribute. To turn this attribute off for all elements on a page, open your browser's dev tools and type $('#*').show() into the console.

On my B315, this allows me to change the DNS server addresses sent via DHCP:

image

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 17, 2024 07:44
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@phpdude
phpdude / example.js
Last active May 17, 2024 07:39
PhantomJS: hellper for writing scripts waiting full page load (DOMContentLoaded event)
var system = require("system");
var url = system.args[1];
require('./phantom-full-load')(phantom, url, function (page, logs) {
logs.forEach(function (i) {
console.log('> ' + i);
});
result = page.evaluate(function () {
return $('body *').attr('class');

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@cjoudrey
cjoudrey / twitter.js
Created November 5, 2011 16:37
Lazy-rendering in PhantomJS
// This example shows how to render pages that perform AJAX calls
// upon page load.
//
// Instead of waiting a fixed amount of time before doing the render,
// we are keeping track of every resource that is loaded.
//
// Once all resources are loaded, we wait a small amount of time
// (resourceWait) in case these resources load other resources.
//
// The page is rendered after a maximum amount of time (maxRenderTime)
@Xart3mis
Xart3mis / platformio.ini
Last active May 17, 2024 07:37
stm32 black pill platformio configuration file
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
@neomantra
neomantra / High_Performance_Redis.md
Last active May 17, 2024 07:35
Notes on running Redis with HPC techniques

High Performance Redis

In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).

The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.

My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [redis.io documentation](https://redis.io/do

@aqualungdesign
aqualungdesign / gist:4612802
Created January 23, 2013 20:35
Changing the photoshop cs6 language. MAC OS
#go to folder:
/Applications/Adobe Photoshop CS6/Locales/pt_BR/Support Files/tw10428.dat
#rename the file tw10428.dat for tw10428.bak
@jcheong0428
jcheong0428 / lmer-in-python.ipynb
Last active May 17, 2024 07:23
LMER in Python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.