This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8. WEB DEVELOPMENT | |
# --------------------------------------- | |
alias apacheEdit='sudo edit /etc/httpd/httpd.conf' # apacheEdit: Edit httpd.conf | |
alias apacheRestart='sudo apachectl graceful' # apacheRestart: Restart Apache | |
alias editHosts='sudo edit /etc/hosts' # editHosts: Edit /etc/hosts file | |
alias herr='tail /var/log/httpd/error_log' # herr: Tails HTTP error logs | |
alias apacheLogs="less +F /var/log/apache2/error_log" # Apachelogs: Shows apache error logs | |
httpHeaders () { /usr/bin/curl -I -L $@ ; } # httpHeaders: Grabs headers from web page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//helper to get a file extension | |
String.prototype.getExtension = function() { | |
var basename = this.split(/[\\/]/).pop(), // extract file name from full path ... | |
// (supports `\\` and `/` separators) | |
pos = basename.lastIndexOf("."); // get last position of `.` | |
if (basename === "" || pos < 1) // if file name is empty or ... | |
return ""; // `.` not found (-1) or comes first (0) | |
return basename.slice(pos + 1); // extract extension ignoring `.` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Collections; | |
using System.Linq; | |
using UnityEngine; | |
public class Player : MonoBehaviour { | |
[SerializeField] | |
float flippedTime = 0f; | |
float startFlip = 0f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rotate the object from it's current rotation to "newRotation" over "duration" seconds | |
void StartRotate(Vector3 newRotation, float duration = 0.5f) | |
{ | |
if (SlerpRotation != null) // if the rotate coroutine is currently running, so let's stop it and begin rotating to the new rotation. | |
StopCoroutine(SlerpRotation); | |
SlerpRotation = Rotate(newRotation, duration); | |
StartCoroutine(SlerpRotation); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Unlit/maskedSprite" | |
{ | |
Properties | |
{ | |
[Toggle]_ShowMask ("Preview mask", Float) = 0 | |
[Space] | |
[Toggle]_UseAlpha ("Vertex Alpha > Threshold", Float) = 0 | |
[Space] | |
_MaskThrs ("Mask Threshold", Range(0,1)) = .5 | |
_MaskSoft ("Mask Width", Range (0.001, 3)) = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ng.smartalumni.smartsocket; | |
import android.os.Handler; | |
import android.os.Looper; | |
import android.support.annotation.NonNull; | |
import org.json.JSONException; | |
import org.json.JSONObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class CameraShake : MonoBehaviour | |
{ | |
public static CameraShake main; | |
// Transform of the camera to shake. Grabs the gameObject's transform | |
// if null. | |
public Transform camTransform; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using DG.Tweening; | |
using System; | |
[RequireComponent(typeof(CanvasGroup))] | |
public abstract class ScreenBase : MonoBehaviour | |
{ | |
CanvasGroup canvasGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using DG.Tweening; | |
using System; | |
[RequireComponent(typeof(CanvasGroup))] | |
public abstract class ScreenBase : MonoBehaviour | |
{ | |
CanvasGroup canvasGroup; |
OlderNewer