Skip to content

Instantly share code, notes, and snippets.

View Hagith's full-sized avatar
👨‍💻
Working from home

Rafał Gałka Hagith

👨‍💻
Working from home
View GitHub Profile
@Hagith
Hagith / install_puppet.sh
Last active March 1, 2022 06:47 — forked from danieldreier/install_puppet.sh
multi-distro puppet install script
#!/bin/bash
# This script installs puppet on most linux distros.
# To run, simply execute as root.
# $ install_puppet.sh [ puppet_version ]
# e.g. $ install_puppet.sh 3.4.1
# Successfully run on Debian 6/7, Ubuntu 12.04 LTS and 14.04 LTS, Fedora 20, and arch.
# Not tested on OS X, Solaris, AIX, etc, simply because I lack test environments.
# https://gist.github.com/danieldreier/8172bee4467127a992d8
@Hagith
Hagith / drawing-tools.html
Created June 12, 2013 14:45
Google Maps v3 Drawing Tools
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {
@Hagith
Hagith / ngx-bootstrap.module.ts
Created March 9, 2020 15:45
include only used ngx-bootstrap components
/**
* Import only used ngx-bootstrap components.
*
* @see https://valor-software.com/ngx-bootstrap/#/getting-started
*/
import { Injectable, NgModule } from '@angular/core';
import {
AlertModule,
BsDatepickerConfig,
BsDatepickerModule,
@Hagith
Hagith / _dropdown.scss
Last active January 24, 2020 16:21
ngx-bootstrap-dropdown-popper - https://stackblitz.com/edit/angular-msq1rb
$dropdown-bg: #fff;
$dropdown-arrow-size: 6px;
.dropdown-menu {
// reset basic dropdown position for Popper.js
&[x-placement^='top'],
&[x-placement^='right'],
&[x-placement^='bottom'],
&[x-placement^='left'] {
top: auto;
const spawn = require('child_process').spawn;
const glob = require('glob');
const fs = require('fs');
const path = require('path');
const which = require('which');
const availableLanguages = require('./available');
try {
which.sync('xgettext');
which.sync('msgmerge');
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
var db;
// https://developer.mozilla.org/en/IndexedDB/Using_IndexedDB
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
@Hagith
Hagith / .gitignore
Created April 3, 2014 12:39
Tizen gitignore
.settings
.build*
*signature*.xml
*.wgt
.*_delta*
@Hagith
Hagith / Gruntfile.js
Created December 1, 2013 22:58
Gruntfile for Tizen
'use strict';
module.exports = function(grunt) {
// load all installed grunt tasks
require('load-grunt-tasks')(grunt);
grunt.file.readXML = function(filepath) {
require('require-xml');
return JSON.parse(require(__dirname + '/app/' + filepath));
};
@Hagith
Hagith / git-prompt.sh
Created December 1, 2013 20:42
Git prompt for bash
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
@Hagith
Hagith / cli.sh
Created September 13, 2013 14:25
grunt
web-build ./ -e "node_modules*" -e "nbproject*" -e ".git*" -e "Gruntfile.js" -e "package.json" -e "/.*" --output .build ./
cd .build/
web-signing -p r.galka
web-packaging -o -n ../shabetteconcier.wgt ./
web-install -w widget.wgt