Skip to content

Instantly share code, notes, and snippets.

View psqq's full-sized avatar
🙃
Where is my mind?

Sergey Pestov psqq

🙃
Where is my mind?
View GitHub Profile
@Guest007
Guest007 / set_ff.md
Last active April 4, 2023 13:28
Настройка Firefox

I. СОЗДАНИЕ НОВОГО ПРОФИЛЯ

Используйте менеджер профилей, чтобы создать новый профиль Firefox.

LINUX:

В терминале (консоли) Linux исполните команду от обычного пользователя:

firefox -P
@mrmlnc
mrmlnc / electron-api.md
Last active August 25, 2023 07:23
Electron API

Базовые возможности

process — это объект, позволяющий получить информацию о типе запущенного процесса (рендеринг или основной процесс), версию Chrome и Electron, а также путь до выполняемого js-файла.

Пользовательские элементы DOM:

Объект File — это абстракция над нативным File, передающая стандартному HTML5 file API путь к физическому расположению файла в файловой системе пользователя.

@legumbre
legumbre / love2d.el
Created November 18, 2014 21:01
launch love2d app from Emacs
(defvar love2d-program "~/dev/love.app/Contents/MacOS/love")
(defun love2d-launch-current ()
(interactive)
(let ((app-root (locate-dominating-file (buffer-file-name) "main.lua")))
(if app-root
(shell-command (format "%s %s &" love2d-program app-root))
(error "main.lua not found"))))
@mudge
mudge / eventemitter.js
Last active June 27, 2024 07:12
A very simple EventEmitter in pure JavaScript (suitable for both node.js and browsers).
/* Polyfill indexOf. */
var indexOf;
if (typeof Array.prototype.indexOf === 'function') {
indexOf = function (haystack, needle) {
return haystack.indexOf(needle);
};
} else {
indexOf = function (haystack, needle) {
var i = 0, length = haystack.length, idx = -1, found = false;
@willurd
willurd / web-servers.md
Last active June 28, 2024 12:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@AliMD
AliMD / gist:3344523
Created August 13, 2012 22:28
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@ialpert
ialpert / nodejs.download.js
Created July 18, 2012 14:43
Download file using GET and nodejs
function download(url, cb) {
var data = "";
var request = require("http").get(url, function(res) {
res.on('data', function(chunk) {
data += chunk;
});
res.on('end', function() {
cb(data);