Skip to content

Instantly share code, notes, and snippets.

View doggan's full-sized avatar

Shyam Guthikonda doggan

View GitHub Profile
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active April 19, 2024 14:03
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@rcavallari
rcavallari / CloudBundle.cs
Created August 13, 2016 16:12 — forked from chatpongs/CloudBundle.cs
Unity C# script to let Unity Cloud Build create bundles and upload them to some server
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using AssetBundles; // Require AssetBundleManager available here https://www.assetstore.unity3d.com/en/#!/content/45836
// Place this file in Editor filder
public class CloudBundle{
[PostProcessBuildAttribute(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
@DashW
DashW / ScreenRecorder.cs
Last active April 17, 2024 23:45
ScreenRecorder - High Performance Unity Video Capture Script
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Threading;
class BitmapEncoder
{
public static void WriteBitmap(Stream stream, int width, int height, byte[] imageData)
@liortal53
liortal53 / RemoveEmptyFolders.cs
Last active October 9, 2023 12:46
Clean Unity project from empty folders
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public class RemoveEmptyFolders
{
/// <summary>
/// Use this flag to simulate a run, before really deleting any folders.
/// </summary>
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@seancoyne
seancoyne / fix-google-drive-menu-bar-icons.sh
Created October 21, 2014 15:34
Fix Google Drive Yosemite Dark Mode Menu Bar Icons
#!/usr/bin/env bash
# change to proper directory
cd /Applications/Google\ Drive.app/Contents/Resources/
# back up the files
sudo mkdir icon-backups
sudo cp mac-animate*.png icon-backups/
sudo cp mac-error*.png icon-backups/
sudo cp mac-inactive*.png icon-backups/
/*
makeIsoTiledWorld
=================
An interpreter for isometric Tiled Editor JSON output.
Important: To work it requires to custom map properties:
`cartTilewidth` and `cartTileheight`. These are the Cartesian
(flat 2D) dimensions of the tile map array. These are needed
because it's common to have a 32x32 tile map array that displays
64x64 sprites.
@rudijs
rudijs / gulpfile.js
Last active December 1, 2023 08:20
GulpJS Jshint with Notify on Error
var gulp = require('gulp'),
watch = require('gulp-watch'),
// This will keeps pipes working after error event
plumber = require('gulp-plumber'),
// linting
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
@eric-hu
eric-hu / Open iterm tab here
Last active March 11, 2022 02:45
Apple script to open an iterm2 tab from right-clicking on a file or folder in Finder. To use: (1) Open Automator (2) Create a new service (3) Change "Service receives selected" drop downs to "Files or folders" in "Finder" (4) Select "Run applescript" from the sidebar, then paste this script in and save
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer:
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).