Skip to content

Instantly share code, notes, and snippets.

View Mati365's full-sized avatar
🍋
Lemons

Mateusz Bagiński Mati365

🍋
Lemons
View GitHub Profile
{
"title" : "Zarządzaj kontami:",
"icon" : "home",
"links" : [
{
"title" : "Dodaj",
"sref" : ""
},
{
"title" : "Edytuj",
// bug: element.bind('click', <any> element.toggleClass.bind(element, scope.className));
element.bind('click', () => {
element.toggleClass(scope.className)
});
export module Directives {
interface ITabsScope extends ng.IScope {
repeat: string;
pages: number;
}
export class Tabs implements ng.IDirective {
public priority: number = 5000;
public terminal: boolean = true;
public scope = {
export class Tabs implements ng.IDirective {
public priority: number = 5000;
public terminal: boolean = true;
//public scope = {
// repeat: '@appTabs'
// , pages: '@appTabsLimit'
//};
constructor(
private $compile: ng.ICompileService) {
match = re.search("pyWinUSB\/\w{40}\/source\/(.*\/)", file)
dest_file = "/".join([
self.destination_mount
, match.group(1) if match else ""
])
String.prototype['format'] = function(...params: any[]): string {
return this.replace(/\{(\w*)\}/g, (match, val) => {
return isNaN(val) ? params[0][val] : params[val];
});
};
@Mati365
Mati365 / shit.c
Last active September 10, 2015 10:24
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
void silnia() {
int n = 0, t = 1, i =0;
printf("Dawaj silnie:"); scanf("%d", &n);
if(n >= 0) {
for(i = 1;i <= n; ++i)
<html>
<body>
<div class='kalkulator'>
<input type='text'>
<select>
<option>+</option>
<option>-</option>
<option>*</option>
<option>/</option>
</select>
@Mati365
Mati365 / partialBind.ts
Created November 8, 2015 12:13
Underscore partial with context in typescript
_.mixin({
partialBind: (fn: Function, context: any, ...args: any[]): any => {
return _.bind(_.partial(fn, ...args), context);
}
});
#include <iostream>
#include <math.h>
using std::cout;
using std::cin;
using std::endl;
int main() {
float a, b, c;
cout