Skip to content

Instantly share code, notes, and snippets.

View vanadium23's full-sized avatar

Ivan Chernov vanadium23

View GitHub Profile
@vii33
vii33 / obsidian-vii-adjustable-readable-line-length.css
Last active April 13, 2024 14:50
Changes the readable line length in Obsidian Notes. Tested in Obsidian v1.0.0
/* Changes the readable line length in Obsidian Notes. Tested in Obsidian v1.0.0
See https://gist.github.com/vii33/f2c3a85b64023cefa9df6420730c7531/f4ea845b240e94c9fcd47d456340f78208dab38f
*/
body {
--file-line-width: 750px;
}
@7rulnik
7rulnik / get-ps4-games.js
Created June 29, 2020 01:25
get-ps4-games.js
// works only for russian language but you can change arguments in meta.includes
// Open https://store.playstation.com/ru-ru/download/list and run script below
let games = [];
while (
!document
.querySelector('.paginator-control__page-number--selected')
.nextElementSibling.classList.contains('paginator-control__arrow-navigation')
Introduction
============
Industry statistics as a whole have failed to improve much since 1968, when software engineering and
scientific management were introduced as means for resolving the "software crisis". Unfortunately
abandoned projects, cost/time overruns, and bloated, buggy software still dominate the landscape.
In spite of the efforts to mitigate this situation --like XP, agile, software craftsmanship or DDD-- the
reality is that a usual software project stack involves an increasingly larger number of programming
languages, DSLs, frameworks, systems, tools, techniques and processes, so it is a fact that the
@yougg
yougg / proxy.md
Last active April 7, 2024 04:02
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
@tkachenko1503
tkachenko1503 / why-do-we-need-types-in-javascript.md
Last active April 21, 2020 10:35
Do we need types in JavaScript? Or maybe not?

This is my lightning talk submission to ReactiveConf 2018 https://reactiveconf.com/

In this talk, I want to share my experience gained during the development of frontend applications in several programming languages.

I think it's not a secret for anybody that developing large JavaScript applications is not so easy as it seems at first glance. We all want something simpler and more reliable. Therefore, many developers and even entire companies switch to different, compiled in JavaScript, programming languages. The bulk of such transitions is accounted for TypeScript and flow, and often, developers faced with more problems than they were before.

I wasn't the exception. Moving to a new project, I started using TypeScript and was disappointed. Luckily in my next project I used ClojureScript and it was like everything is illuminated!

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 26, 2024 15:48
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Давай представим ситуацию, когда тебе, в зависимости от какой-то логики нужно вернуть данные разного типа, например есть такая функция:

def function(foo, bar)
  result = if foo > bar
    10
  else
    "wrong"
  end
end
#!/bin/sh
# CONFIGURATION
# 1. Go to @botfather and create a bot and use it's auth token as bot_token value
# 2. Create test channel, believe me, you need it
# 3. Set some url for your test channel
# 4. Add your bot to both channels, set their names in variables
# USAGE
# 1. Copy your markdown-formatted message into OS clipboard (Cmd+C)
@artjomb
artjomb / 1_phantomErrors.js
Last active April 5, 2022 22:10
Error event handlers for PhantomJS and CasperJS: PhantomJS and CasperJS don't show errors on the page by default. This can give clues as to what did go wrong.
var page = require('webpage').create(),
url = 'http://example.com/';
// Put the event handlers somewhere in the code before the action of
// interest (opening the page in question or clicking something)
// http://phantomjs.org/api/webpage/handler/on-console-message.html
page.onConsoleMessage = function(msg, lineNum, sourceId) {
console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")');
};
@mikelehen
mikelehen / generate-pushid.js
Created February 11, 2015 17:34
JavaScript code for generating Firebase Push IDs
/**
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
*/