Skip to content

Instantly share code, notes, and snippets.

View abirpahlwan's full-sized avatar

Pahlwan Rabiul Abir abirpahlwan

View GitHub Profile
@ruzrobert
ruzrobert / Vibration.cs
Last active June 7, 2024 20:42
Android Vibration for Unity 3D. Supports all API: 1 - 29 (auto detect), Amplitudes, Predefined Effects, both Legacy and >=26 APIs.
using System.Diagnostics.CodeAnalysis;
using UnityEngine;
// Dont forget to add "using RDG;" to the top of your script!
namespace RDG
{
/// <summary>
/// Class for controlling Vibration. Automatically initializes before scene is loaded.
/// </summary>
public static class Vibration
@arimger
arimger / BrushPrefabDrawer.cs
Last active January 31, 2022 11:04
Simple tool to create objects on a specific layer in Unity
using UnityEditor;
using UnityEngine;
//NOTE: Editor-related scripts should be placed in an Editor folder
namespace Toolbox
{
[CustomPropertyDrawer(typeof(BrushPrefab))]
public class BrushPrefabDrawer : PropertyDrawer
{
@Ian-FR
Ian-FR / Fix WSL DNS
Last active February 23, 2024 15:38
WSL as Web Server
# /etc/wsl.conf
[network]
generateResolvConf = false
# /etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1
@nikhilkumarsingh
nikhilkumarsingh / real_time.ipynb
Created August 19, 2018 20:04
Plotting real time data using Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@msmfsd
msmfsd / es7-async-await.js
Last active February 4, 2024 17:38
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
@asus4
asus4 / DownloadManager.cs
Created April 25, 2012 14:32
Unity DownloadManager
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/**
DownloadManager
@author koki ibukuro
*/
public class DownloadManager : MonoBehaviour , System.IDisposable {
// using classes