Skip to content

Instantly share code, notes, and snippets.

View noseratio's full-sized avatar

Andrew Nosenko noseratio

View GitHub Profile
@fcingolani
fcingolani / index.html
Created August 9, 2012 02:16
How to render a full PDF using Mozilla's pdf.js
<html>
<body>
<!-- really dirty! this is just a test drive ;) -->
<script type="text/javascript" src="https://raw.github.com/mozilla/pdf.js/gh-pages/build/pdf.js"></script>
<script type="text/javascript">
function renderPDF(url, canvasContainer, options) {
var options = options || { scale: 1 };
@willurd
willurd / web-servers.md
Last active May 10, 2024 05:14
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
@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing
@davidfowl
davidfowl / dotnetlayout.md
Last active May 9, 2024 19:43
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@DanDiplo
DanDiplo / JS-LINQ.js
Last active May 7, 2024 14:27
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@ValdikSS
ValdikSS / huawei-fw-list.txt
Last active April 26, 2024 21:03
Huawei firmware files found on update server
==========================================================================
DO NOT WRITE ANY QUESTIONS IN COMMENTS
==========================================================================
This is not appropriate place for discussions. Keep this list FW-only.
I do NOT have any firmware files apart from published here or on 4pda. Please do not contact me for firmware files requests.
This is a list of files found on Huawei update server by brute-forcing URL parameters.
Some firmware files have changelogs. Just change file name to "changelog.xml" in the end of the URL.
@harrisonlingren
harrisonlingren / fix_windows.bat
Last active February 5, 2022 20:25
A script to fix Windows 10 shit
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
sc config DiagTrack start= disabled
sc config diagnosticshub.standardcollector.service start= disabled
sc config dmwappushservice start= disabled
@phsultan
phsultan / testApiKeyAndGrpc.js
Last active August 2, 2023 12:54
Google Speech Recognition with API key + gRPC
/**
* Make sure you're not already authenticated with gRPC, on MacOS you need
* to ensure the GOOGLE_APPLICATION_CREDENTIALS environment variable is not
* set : `unset GOOGLE_APPLICATION_CREDENTIALS`
*
* @google-cloud/speech and google-gax are used to load the necessary .proto files
*
* I tried to add the 'key' to the request itself, or as a metadata with the request
* and always getting the following error from gRPC :
* Error: 7 PERMISSION_DENIED: The request is missing a valid API key.
@Juul
Juul / lte_mbim_from_scratch.md
Last active May 6, 2024 15:17
How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM

The purpose of this document is to get you familiar with the concepts and command line tools involved with connecting to the internet using modern 4G LTE modems on both Debian/Ubuntu and OpenWRT.

This writeup is based on my experiences with the Sierra Wireless AirPrime MC7455 modem and a Calyx (Sprint) SIM card, but it should apply to most modern 4G LTE modems.

High level overview

These are the steps required:

  • Physically connect antennas