Skip to content

Instantly share code, notes, and snippets.

View steelx's full-sized avatar
🎮
GameDev by night

Ajinkya Borade steelx

🎮
GameDev by night
View GitHub Profile
@steelx
steelx / .ideavimrc
Created May 13, 2022 05:02 — forked from AlexPl292/.ideavimrc
My `~/.ideavimrc` file
let mapleader=" "
""" Plugins --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
set textobj-entire
set ReplaceWithRegister
@steelx
steelx / remove env file from git
Created January 29, 2021 05:41 — forked from gjerokrsteski/remove env file from git forever
remove env file from git history
echo '.env' >> .gitignore
git rm -r --cached .env
git add .gitignore
git commit -m 'untracking .env'
git push origin master
@steelx
steelx / esp32_ota_stm32.ino
Created November 6, 2020 12:56 — forked from rounakdatta/esp32_ota_stm32.ino
Flash STM32 firmware from ESP32
#include <SPIFFS.h>
/*
*
* Copyright (C) 2017 CS.NOL https://github.com/csnol/1CHIP-Programmers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License,
* and You have to keep below webserver code
@steelx
steelx / introrx.md
Created August 26, 2020 13:10 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@steelx
steelx / backup bash filez
Last active August 17, 2020 14:58 — forked from azappa/backup bash filez
Ubuntu fix dual monitor reboot
#!/bin/bash
# -------------------------------------------------
# Get monitors configuration from monitor.xml and apply it for current user session.
# In case of multiple definitions in monitor.xml only first one is used.
#
# See http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost
# for instructions
#
# Revision history :
# 19/04/2014, V1.0 - Creation by N. Bernaerts

#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 https://downloads.raspberrypi.org/raspbian_lite_latest
  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
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
steelx / gulpfile-express.js
Created November 2, 2015 05:24 — forked from mollerse/gulpfile-express.js
Gulpfile for livereload + static server
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,
// Ajax File upload with jQuery and XHR2
// Sean Clark http://square-bracket.com
// xhr2 file upload
// data is optional
$.fn.upload = function(remote,data,successFn,progressFn) {
// if we dont have post data, move it along
if(typeof data != "object") {
progressFn = successFn;
successFn = data;
}
@steelx
steelx / README.md
Created July 29, 2013 17:10 — forked from m4dz/README.md

This files contains my boilerplates for jQuery plugins.