Skip to content

Instantly share code, notes, and snippets.

View alhafoudh's full-sized avatar

Ahmed Al Hafoudh alhafoudh

View GitHub Profile
root@ip-172-31-6-203:/var/lib/docker# cat repositories-aufs
{"Repositories":{}}
root@ip-172-31-6-203:/var/lib/docker# cat repositories-devicemapper
{"Repositories":{"freevision/phantomjs":{"latest":"596c486eb6cdc0a05b9911b2f0c07c3ef9827871513a5e798cb248e0190b01eb"}}}
root@ip-172-31-6-203:/var/lib/docker# docker images -a
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<?xml version="1.0" ?>
<device>
<deviceProtocol>SIP</deviceProtocol>
<sshUserId>root</sshUserId>
<sshPassword>cisco</sshPassword>
<devicePool>
<dateTimeSetting>
<dateTemplate>M/D/YA</dateTemplate>
<timeZone>Central Standard/Daylight Time</timeZone>
<ntps>
@alhafoudh
alhafoudh / build.gradle
Created July 14, 2016 17:56
Gradle file for backendless hosted service
group 'sk.freevision.myservice'
version '1.0.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
@alhafoudh
alhafoudh / Config.java
Created February 4, 2017 11:47
Spring multiple data sources
package sk.freevision.probase.config;
import org.springframework.context.annotation.Configuration;
@Configuration
//@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
public class Config {
// @Bean(name = "metaDataSource")
// @Primary
const _ = require('lodash');
function printKeys(key, obj, parentKeyPath = '') {
const keyPath = `${parentKeyPath}.${key}`;
console.log(keyPath);
if (_.isArray(obj) && !_.isEmpty(obj)) {
printKeys(key, _.head(obj), keyPath);
} else if (_.isObject(obj)) {
const firstKey = _.head(_.keys(obj));
apiVersion: v1
kind: PersistentVolume
metadata:
name: test-volume
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
class Throttler
attr_reader :period
attr_reader :value
attr_reader :block
def initialize(period)
@period = period
@first_time = nil
@value = nil
@block = proc { }
@alhafoudh
alhafoudh / keycloak_openresty_auth.conf
Created January 12, 2018 22:35
keycloak openresty authentication
set $session_check_ssi off;
set $session_secret Eeko7aeb6iu5Wohch9Loo1aitha0ahd1;
set $session_storage cookie;
access_by_lua_block {
local opts = {
redirect_uri_path = "/auth",
discovery = "https://keycloak.freevision.sk/auth/realms/rancher-elk/.well-known/openid-configuration",
client_id = "nginx",
client_secret = "2cfde6f9-4283-456a-9f13-1b803482db9a"
/*
Usage:
CustomRoute(page: SomewPage, transitionsBuilder: CustomTransitions.withoutShadow)
*/
import 'dart:ui';
import 'package:flutter/foundation.dart';
@alhafoudh
alhafoudh / package.json
Last active January 5, 2021 22:36
Tailwind Rails Scaffold
{
"dependencies": {
"@tailwindcss/aspect-ratio": "^0.2.0",
"@tailwindcss/forms": "^0.2.1",
"@tailwindcss/typography": "^0.3.1",
"autoprefixer": "^10.1.0",
"postcss": "^8.2.2",
"tailwindcss": "^2.0.1-compat"
},
"devDependencies": {}