This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* creating an alternating color decoration*/ | |
/* first row after header*/ | |
.panel-grid:nth-child(1n+1) .panel-grid-cell:nth-child(1n) .blocks-content{ | |
background-color: #E84036; | |
} | |
.panel-grid:nth-child(1n+1) .panel-grid-cell:nth-child(2n) .blocks-content{ | |
background-color: #FECB0D; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ngdoc directive | |
* @name frontendApp.directive:equals | |
* @description | |
* A directive to show and hide a loading bar. it takes two attributes (show-event and hide-event) which must be the event names it should listen on on the rootScope. | |
*/ | |
.directive('waitBar', ['$rootScope', function ($rootScope) { | |
return { | |
restrict: 'E', // only activate on element attribute | |
link: function (scope, elem, attrs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#weather function | |
function weather() { | |
if [[ $1 != "in" ]] | |
then | |
CITY=$1 | |
else | |
CITY=$2 | |
fi | |
curl http://wttr.in/$CITY; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FILES=/Users/pbr/Documents/Code/bash/* | |
for f in $FILES | |
do | |
echo "Processing $f file..." | |
# take action on each file. $f store current file name | |
source $f | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AD": "Andorra", | |
"AL": "Albania", | |
"AT": "Austria", | |
"AX": "Åland Islands", | |
"BA": "Bosnia and Herzegovina", | |
"BE": "Belgium", | |
"BG": "Bulgaria", | |
"BY": "Belarus", | |
"CH": "Switzerland", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {ICoordinate} from "./LiveMapModels"; | |
import {TimeSpan} from "./UtilityInterfaces"; | |
export interface IUser { | |
username: string; | |
size: number; | |
clientId: number; | |
language?: string; | |
uwb?: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#requires sejda-console to be in the path as 'sejda' | |
#https://github.com/torakiki/sejda/releases/download/v2.7/sejda-console-2.7-bin.zip | |
if [ "$1" == "-h" ]; then | |
echo "Usage: pass the name of one file in the /in folder as a parameter. put all pdfs in an in/ folder" | |
exit 0 | |
fi | |
rm -r out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Instruction: | |
// 1. go here https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen | |
// 2. open dev console | |
// 3. paste code below and execute expandAll() | |
// 4. repeat for all categories that aren't shown simulaneously | |
function expandAll(){ | |
var intr = setInterval(function(){ | |
var btns = document.getElementsByClassName('_45yq'); //the class name of the expand buttons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let snackSpy = jasmine.createSpyObj('snackBar', ['open']); | |
//... | |
//....beforeEach, TestBed configurations etc | |
//... | |
it('should let listeners subscribe', function () { | |
expect(service._listeners.length).toBe(0); | |
service.addListener({ | |
onLoading: () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from "@angular/core"; | |
import {MdSnackBar, MdSnackBarRef, SimpleSnackBar} from "@angular/material"; | |
import {Observable} from "rxjs"; | |
import {LoadingEventListener} from "./LoadingEventListener"; | |
@Injectable() | |
export class VFeedbackService { | |
_listeners: LoadingEventListener[] = []; |
OlderNewer