Skip to content

Instantly share code, notes, and snippets.

View basarat's full-sized avatar
🌹
youtube.com/basaratali

Basarat Ali Syed basarat

🌹
youtube.com/basaratali
View GitHub Profile
@basarat
basarat / gist:5c67c0041c381f0dc692
Created December 12, 2014 22:30
Apache (mod_proxy / mode_http) + Nodejs
<VirtualHost 8.8.8.8:80>
ServerAdmin davy.brion@thatextramile.be
ServerName thatextramile.be
ServerAlias www.thatextramile.be
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
@basarat
basarat / gist:00e580b1fae842016941
Created January 16, 2015 17:40
sample directive
export class FooDirectiveController {
static $inject = ['$element', '$scope'];
constructor(public $element: JQuery, public $scope: FooDirectiveScope) {
$scope.vm = this;
// Any Jquery access goes here. Use $element
// Setup any $watch on $scope that you need
}
/// <reference path="typings/node/node.d.ts" />
/// <reference path="typings/typescript/typescript.d.ts" />
import fs = require("fs");
import ts = require("typescript");
import path = require("path");
function watch(filenames: string[], options: ts.CompilerOptions) {
var files: ts.Map<{ version: number; text: string; }> = {};
@basarat
basarat / styles.less
Last active December 13, 2017 16:49
Atom Styles.less
// Style the find results
atom-text-editor::shadow .highlight.find-result .region {
background: rgb(163,163,0);
transition: background-color 0.2s, border-color 0.2s;
}
atom-text-editor::shadow .highlight.current-result .region,
atom-text-editor::shadow .highlight.current-result ~ .highlight.selection .region {
background: orange;
border-color: red;
}
@basarat
basarat / designer.html
Last active August 29, 2015 14:20
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@basarat
basarat / designer.html
Last active August 29, 2015 14:21
designer
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@basarat
basarat / designer.html
Last active August 29, 2015 14:21
designer
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
This file has been truncated, but you can view the full file.
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\iojs\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\iojs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'electron-prebuilt',
1 verbose cli '-g' ]
2 info using npm@2.11.1
3 info using node@v2.3.0
4 verbose install initial load of C:\Users\bas\AppData\Roaming\npm\package.json
5 verbose readDependencies loading dependencies from C:\Users\bas\AppData\Roaming\npm\package.json
@basarat
basarat / gist.ts
Last active January 18, 2016 16:38
export function extend(...args: any[]):any {
var extendRecursive = (x:any[], extractFields:(y)=>void) => {
for (let obj of x) {
if (obj) {
if (obj instanceof Array) {
extendRecursive(obj, extractFields)
}
else {
extractFields(obj);
}