Skip to content

Instantly share code, notes, and snippets.

View Hais's full-sized avatar
🥐
Brunchin'

Hais Deakin Hais

🥐
Brunchin'
View GitHub Profile
@Hais
Hais / filter.swift
Created December 13, 2023 19:18 — forked from avinashselvam/filter.swift
A swift class that implements GPU based image processing
//
// filter.swift
// fltr
//
// Created by Avinash on 18/06/19.
// Copyright © 2019 eightyfive. All rights reserved.
//
import Metal
import MetalKit
@Hais
Hais / generate_xcode_assets.sh
Last active January 26, 2016 10:33
Generate XCode assets
#!/bin/bash
CAT_NAME=${PWD##*/}
XCASSETS_DIR="./${CAT_NAME}.xcassets"
mkdir $XCASSETS_DIR
for SVG_FILE in *.svg
@Hais
Hais / index.coffee
Created November 24, 2015 08:59
camelscraper
csv = require 'csv'
request = require 'superagent'
require('superagent-retry')(request);
cheerio = require 'cheerio'
fs = require 'fs'
async = require 'async'
require('debug-http')()
INFILE = "deals2.csv"
OUTFILE = "OUTPUT-#{INFILE}"
@Hais
Hais / workspace.sh
Last active February 18, 2016 14:44 — forked from dixson3/workspace.sh
#!/bin/bash
# where to store the sparse-image
WORKSPACE=${HOME}/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
automount() {
@Hais
Hais / class.php
Last active August 29, 2015 14:16
php-trait-issue
<?php
trait Bar {
public function jsonSerialize() {
return ["switch" => static::$SWITCH];
}
}
class Foo implements JsonSerializable {
public static $SWITCH = false;
@Hais
Hais / index.php
Last active August 29, 2015 14:06
CannedREST
<?php
# Run as:
# php -S 0.0.0.0:80 -t . index.php
# A GET Request of
# http://127.0.0.1/3/en/mobile/merchant/nearby?longitude=-0.127758&latitude=51.5073509&merchant_id=123
# Would output the contents of
# ./repo/get/3/en/mobile/merchant/nearby/latitude=51.5073509&longitude=-0.127758&merchant_id=123.json
@Hais
Hais / index.php
Last active August 29, 2015 14:04
SlackShat
<?php
/**
*
* To run:
*
* #1 change token
*
* #2 php -S localhost:8080 index.php
*