Skip to content

Instantly share code, notes, and snippets.

😍
In love with JS

Hammad Asif mrhammadasif

😍
In love with JS
Block or report user

Report or block mrhammadasif

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
@mrhammadasif
mrhammadasif / .eslintrc
Created Aug 22, 2019
Eslint Rules for my Vue Projects with Typescript
View .eslintrc
{
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2017,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
@mrhammadasif
mrhammadasif / iterm2-profile
Created May 20, 2019
iterm2-profile-mrhammadasif
View iterm2-profile
{
"Ansi 6 Color" : {
"Green Component" : 0.50448882579803467,
"Blue Component" : 0.838664710521698,
"Red Component" : 0.061654355376958847
},
"Tags" : [
],
"Ansi 12 Color" : {
@mrhammadasif
mrhammadasif / gulp-plugin.js
Created Feb 13, 2019
gulp plugin for .env files
View gulp-plugin.js
const through = require("through2")
function changeEnvToDev(val) {
return through.obj(function(file, encoding, callback) {
if (file.isNull()) return callback(null, file)
if (file.isStream()) {
//file.contents = file.contents.pipe(...
//return callback(null, file);
this.emit("error", new Error("Streams not supported!"))
View adaptive-payment-paypal-example.php
<?php
class PayPal {
private $config;
private $urls = array(
"sandbox" => array(
"api" => "https://svcs.sandbox.paypal.com/AdaptivePayments/",
"redirect" => "https://www.sandbox.paypal.com/webscr",
),
"live" => array(
@mrhammadasif
mrhammadasif / BetterJump.cs
Created Dec 15, 2017
BetterJump in Unity
View BetterJump.cs
using System.Collections;
using UnityEngine;
public class BetterJump : MonoBehaviour {
public float FallMultiplier = 2.5f;
public float lowJumpMultiplier = 2f;
RigidBody2D rb;
@mrhammadasif
mrhammadasif / SineWaveAnimation.cs
Created Dec 15, 2017
Function to Animate the object in Unity (in sinewave animation)
View SineWaveAnimation.cs
using UnityEngine;
public class SineWaveAnimation : MonoBehaviour {
public float baseSize = 1f;
void Update() {
float animation = baseSize + Mathf.Sin(Time.time * 8f) * baseSize / 7f;
transform.localScale = Vector3.one * animation;
}
}
@mrhammadasif
mrhammadasif / sendmail_setup.md
Created Nov 9, 2017 — forked from kany/sendmail_setup.md
Setup SENDMAIL on Mac OSX Yosemite
View sendmail_setup.md
@mrhammadasif
mrhammadasif / book.js
Last active Jun 21, 2017
Load Dynamic Routes Recursively in ExpressJS App
View book.js
// A file in `routes/` folder
module.exports = (function(app, router){
router
.route('/books')
.get((req, res, next)=>{
if(err){
next(err);
// send it to error handler
}
@mrhammadasif
mrhammadasif / ParallaxPageTransformer.java
Created Apr 25, 2017 — forked from Aracem/ParallaxPageTransformer.java
Parallax transformer for ViewPagers that let you set different parallax effects for each view in your Fragments.
View ParallaxPageTransformer.java
package com.aracem.utils.animations.pagetransformation;
import org.jetbrains.annotations.NotNull;
import android.support.v4.view.ViewPager;
import android.view.View;
import java.util.ArrayList;
import java.util.List;
@mrhammadasif
mrhammadasif / File1.html
Last active Apr 4, 2017
Show HTML based design in Android with Interfaces attachment
View File1.html
<html>
<head>
<script type="text/javascript" src="arel/js/File3.js"></script>
</head>
<body>
<button onClick="saveId('1');">1</button>
<button onClick="saveId('2');">2</button>
</body>
</html>
You can’t perform that action at this time.