Navigation Menu

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 / 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');
@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 / gallery-scroll.php
Last active August 29, 2015 14:02
Simple gallery with continuous scroll
@Hagith
Hagith / .gitignore
Created April 3, 2014 12:39
Tizen gitignore
.settings
.build*
*signature*.xml
*.wgt
.*_delta*
@Hagith
Hagith / package.json
Created March 20, 2014 12:29
Simple Socket.io server for chat-like communication.
{
"name": "Socket",
"description": "Simple Socket.io server for chat-like communication.",
"version": "0.1.0",
"main": "server.js",
"dependencies": {
"socket.io": "~0.9.16"
}
}
@Hagith
Hagith / bash_notes.sh
Last active August 29, 2015 13:56
Bash notes
# count lines in directory
find . -type f ! -path "\.git" ! -path "./CMakeFiles/*" | xargs wc -l
# du of hidden directories
du -hs .[^.]*
du -s .[^.]* | sort -nr
# mirror apache listing
wget --execute="robots = off" --mirror --convert-links --no-parent -R index.html [http://example.com/path/to/dir]
find -name "index.html*" -exec rm {} \;
@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\]"