Skip to content

Instantly share code, notes, and snippets.

View mul14's full-sized avatar
:octocat:
Preparing for big things...

Mulia Nasution mul14

:octocat:
Preparing for big things...
View GitHub Profile
<select2
v-model="something"
:options="[{ id: 1, text: '', selected: true }]"
multiple
placeholder
></select2>
@mul14
mul14 / init.lua
Created December 22, 2016 00:56 — forked from prenagha/init.lua
Hammerspoon Config File, Hyper Key, Karabiner-Elements
-- hattip https://github.com/lodestone/hyper-hacks
-- hattip https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907
-- A global variable for the sub-key Hyper Mode
k = hs.hotkey.modal.new({}, 'F18')
-- Hyper+key for all the below are setup somewhere
-- The handler already exists, usually in Keyboard Maestro
-- we just have to get the right keystroke sent
@mul14
mul14 / init.lua
Created December 22, 2016 00:55 — forked from ttscoff/init.lua
Hammerspoon config examples for hyper key
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- Trigger existing hyper key shortcuts
k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end)
-- OR build your own
launch = function(appname)
@mul14
mul14 / selenium_curl.sh
Created December 4, 2016 02:27 — forked from prashanthrajagopal/selenium_curl.sh
Run Selenium test via curl
s_id=`curl -X POST http://127.0.0.1:4444/wd/hub/session -d '{"desiredCapabilities":{"browserName":"firefox","platform":"MAC"}}'|awk -F'"' '{print $6}'`
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/url -d '{"url":"http://www.google.com"}'
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element -d '{"using":"id","value":"gbqfq"}'
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element/0/value -d {"value":["selenium"]}
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element -d '{"using":"id","value":"gbqfb"}'
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element/1/click
curl -X DELETE http://127.0.0.1:4444/wd/hub/session/$s_id/window
@mul14
mul14 / CatchAllOptionsRequestsProvider.php
Created September 2, 2016 11:35 — forked from danharper/CatchAllOptionsRequestsProvider.php
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@mul14
mul14 / origin_monitor.py
Created May 19, 2016 04:51 — forked from SliceOLife/origin_monitor.py
Checks Origin's on the House page for free games.
import requests
import bs4
from termcolor import colored
root_url = 'https://www.origin.com/en-gb/store/free-games/on-the-house'
def getFreeGames():
try:
response = requests.get(root_url)
soup = bs4.BeautifulSoup(response.text)
@mul14
mul14 / meta-tags.md
Created March 21, 2016 10:40 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@mul14
mul14 / VideoStream.php
Created December 31, 2015 07:32 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@mul14
mul14 / README.md
Created December 11, 2015 06:11 — forked from denji/README.md
Remove WebStorm; PhpStorm; PyCharm; RubyMine; AppCode; CLion, IntelliJ; 0xDBE10 settings and cli-links from Mac OSX

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
@mul14
mul14 / css_resources.md
Last active August 29, 2015 14:11 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides