Skip to content

Instantly share code, notes, and snippets.

View inlife's full-sized avatar
🇺🇦
Be Mighty

Vladyslav Hrytsenko inlife

🇺🇦
Be Mighty
View GitHub Profile
@inlife
inlife / Windows10AWSEC2.md
Created April 16, 2024 06:01 — forked from peterforgacs/Windows10AWSEC2.md
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

Type

Must be one of the following:

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
const array2d = array1d
.reduce((cur, i) => {
/* transform 1d array to 2d */
let lastInd = cur.length-1
let lastVal = cur[lastInd]
if (lastVal.length === 3) {
return cur.concat([[i]])
}
@inlife
inlife / mixcloud-tracklist.js
Last active April 1, 2020 08:26
Script allows you to copy tracklist with time frames, while listening to a mix on the Mixcloud.
(async () => {
let guid = prompt("Paste in GUID");
let cast = (data) => {
return data.results.result.map(obj => {
let tracks = obj.trackclients.trackclient
if (tracks.length == 0) {
tracks.push({ track_title: 'Unknown', track_mix_artist: 'Unknown' })
}
/*
JSON5 parser module
License:
This software is dual-licensed to the public domain and under the following
license: you are granted a perpetual, irrevocable license to copy, modify,
publish, and distribute this file as you see fit.
No warranty is implied, use at your own risk.
Credits:
[GAME]D:\Steam\steamapps\common\Mafia II\pc\mafia2.exe.2616.STEAMSTART
[GAME]C:\Users\Inlife\AppData\Local\2K Games\Mafia II\Data\vfs.bin
[GAME]C:\Program Files (x86)\Steam\ClientRegistry.blob
[GAME]C:\Program Files (x86)\Steam\ClientRegistry.blob
[GAME]D:\Steam\steamapps\common\Mafia II\pc\sds_en\info
[GAME]C:\Users\Inlife\AppData\Local\2K Games\Mafia II\Saves\videoconfig.cfg
[GAME]D:\Steam\steamapps\common\Mafia II\edit\sdsconfig.bin
file_patcher: redirecting game file sdsconfig.bin to D:\Projects\m2o-reborn\binary\game_files\sdsconfig.bin
[GAME]D:\Steam\steamapps\common\Mafia II\pc\shaders\ShaderCache[NV__].sc
[GAME]D:\Steam\steamapps\common\Mafia II\pc\shaders\ShaderCache[ATF4].sc
@inlife
inlife / uv_read_file.c
Created February 13, 2017 13:58
Sample for reading a file asynchronously using libuv
// Sample for reading a file asynchronously using libuv
// taken from https://www.snip2code.com/Snippet/247423/Sample-for-reading-a-file-asynchronously
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <uv.h>
static uv_fs_t openReq;
static uv_fs_t readReq;
@inlife
inlife / url_encode.nut
Created December 4, 2016 17:49
Squirrel url_encode
local R = regexp("[A-Za-z0-9]");
function isalnum(value) {
return R.match(value.tochar());
}
function url_encode(value) {
local escaped = "";
for (local i = 0; i < value.len(); i++) {
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten

Keybase proof

I hereby claim:

  • I am inlife on github.
  • I am inlife (https://keybase.io/inlife) on keybase.
  • I have a public key ASBdcGtfPoLhgX7J5lJsseBwgMPPo-mz3pvFz8eYxHq-6Ao

To claim this, I am signing this object: