Skip to content

Instantly share code, notes, and snippets.

View toioski's full-sized avatar

Vittorio Morganti toioski

View GitHub Profile
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@gourneau
gourneau / email.scpt
Created July 8, 2013 05:29
AppleScript script to compose email using Microsoft Outlook
tell (current date) to get (it's month as integer) & "-" & day & "-" & (it's year as integer)
set MyDay to the result as text
set Mytitle to "Daily Email - " as text
set Mytitle to Mytitle & MyDay
tell application "Microsoft Outlook"
set newMessage to make new outgoing message with properties {subject:Mytitle}
make new recipient at newMessage with properties {email address:{name:"Name", address:"test@example.com"}}
#make new cc recipient at newMessage with properties {email address:{name:"Name", address:"test@example.com"}}
@romaricdrigon
romaricdrigon / formController.js
Created August 21, 2013 07:46
Using AngularJS on Symfony2 forms
// An example controller binded to the form
function FormCntl($scope, $compile) {
// Consider using FosJsRouting bundle, if you want to use a Symfony2 route
$scope.formUrl = "http://url-to-fetch-my-form";
// Data from the form will be binded here
$scope.data = {};
// Method called when submitting the form
$scope.submit = function() {
@mvaneijgen
mvaneijgen / material-theme.terminal
Created June 15, 2015 20:27
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@remojansen
remojansen / class_decorator.ts
Last active September 14, 2023 14:54
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}
@bhavik07
bhavik07 / angular2-replace.ts
Last active October 26, 2018 19:30
Another approach that can be used to create components that can replace there host elements, based on my SO question(http://stackoverflow.com/questions/34280475/remove-the-host-html-element-selectors-created-by-angular-component). Consider checking this http://plnkr.co/edit/LFKN5doI9Y9wKwPxBbcJ?p=preview
/// <reference path="../node_modules/angular2/core.d.ts" />
/// <reference path="../node_modules/angular2/platform/browser.d.ts" />
/// <reference path="../node_modules/angular2/common.d.ts" />
import { Component, View, Directive, Input, ElementRef, Output, EventEmitter } from 'angular2/core';
import { bootstrap } from 'angular2/platform/browser';
//remove the host of avatar to be rendered as svg
@Directive({
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove