Skip to content

Instantly share code, notes, and snippets.


Ajinkya Borade steelx

Block or report user

Report or block steelx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
steelx / bounds.go
Created Dec 25, 2019
Go inheritance with Interface (Entity) + pixelgl
View bounds.go
package main
// Bounds - A bounding (rectangle) box with a x,y origin and width and height
type Bounds struct {
X float64
Y float64
Width float64
Height float64
entity Entity
View Headless Setup of Raspberry Pi Zero W (Raspberry Pi 3 Wireless) (macOS).markdown

#Headless Setup of Raspberry Pi Zero W (Raspberry Pi 3 Wireless) (macOS)

  1. Formatt the Micro SD card - Open a terminal and type 'diskutil list'. Find your card and copy the disk name (For example: /dev/disk4). Format the card with diskutil eraseDisk ExFat temp disk4(Use your disk here)
  2. Download Raspbian - wget
  3. Unmount the SD card - diskutil unmountDisk /dev/disk4 or whatever your disk path is
  4. Mount the Raspbian image to the card - sudo dd if=PATH-TO-RASPBIAN-IMAGE of=/dev/disk4` or whatever your disk path is
  5. Enable SSH on the Pi - cd /volumes && ls. You should see a boot partition from the SD card cd boot && touch ssh
  6. Setup WiFi on the PI - While still in the boot partition of the card type nano wpa_supplicant.conf and enter network={ ssid="YOUR-SSID" psk="YOUR-WIFI-PASSWORD" }
  7. Boot the PI - Unmount the card diskutil unmountDisk /dev/disk4 (or whatever your disk path is) and put it in the
steelx /
Last active Nov 14, 2019
Add version to GO package

Tag your git repository with a version number (ideally based on the semantic versioning specification e.g. v0.0.0).

git tag -a v0.0.0 -m "First tag." Push the version number to the remote repository.

git push --tags Generate an up-to-date version_PLATFORM.go file (normally done by your CI server)

go generate The version_PLATFORM.go file gets automatically updated with data from the tag.

steelx / main.go
Created Nov 8, 2019
Sum of Squares
View main.go
package main
import (
steelx / rxjs-behaviour-subject-store.ts
Last active Dec 25, 2019
Angular rxjs-behaviour-subject-store (redux alike store with Rxjs)
View rxjs-behaviour-subject-store.ts
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Observable } from 'rxjs/Observable';
export class Store<T> {
private _state$: BehaviorSubject<T>;
protected constructor(initialState: T) {
this._state$ = new BehaviorSubject(initialState);
steelx / generateThumb.js
Last active May 14, 2018
firebase functions thumbnail
View generateThumb.js
const mkdirp = require('mkdirp-promise');
const gcs = require('@google-cloud/storage')({ keyFilename: 'service-account-key.json' });
const admin = require('firebase-admin');
var serviceAccount = require('./service-account-key.json');
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://<PROJECT_ID>'
steelx / listFiles.js
Created May 13, 2018
firebase storage list files
View listFiles.js
// listFiles.js
const gcs = require('@google-cloud/storage')({keyFilename: 'service-account-key.json'});
module.exports = function listFiles(request, response) {
if(!request.body.uid) {
response.status(422).send({error: "Missing UID"});
console.log("request.body.uid", request.body.uid);
// Creates a client
const bucketName = '<HIDDEN PROJECT ID>';
steelx / Fullstack Helper tools
Created Jan 15, 2018
Creating backend API's and Database easy scripts links and notes
View Fullstack Helper tools
View generateLocales.js
var fs = require('fs');
// Specify the locales you are interested here.
var locales = ['en', 'fr'];
var i;
var localesData = Object.create(null);
var prefix = 'data:text/javascript;base64,';
var outputPrefix = "angular.module('tmh.dynamicLocalePreload', ['tmh.dynamicLocale'])" +
".config(['tmhDynamicLocaleProvider', function(tmhDynamicLocaleProvider) {" +
"tmhDynamicLocaleProvider.localeLocationPattern('{{base64Locales[locale]}}');" +
steelx / gulpfile-express.js
Created Nov 2, 2015 — forked from mollerse/gulpfile-express.js
Gulpfile for livereload + static server
View gulpfile-express.js
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
You can’t perform that action at this time.