Skip to content

Instantly share code, notes, and snippets.

View faizalmansor's full-sized avatar
🎯
Focusing on making the world a better place

Osh faizalmansor

🎯
Focusing on making the world a better place
View GitHub Profile
@alangrainger
alangrainger / clickup-rambox-unread-badge.js
Created June 10, 2020 23:07
Add an unread badge count to ClickUp when using as a custom service in Rambox
/*
Add this into the Custom Code section in your custom service:
https://github.com/ramboxapp/community-edition/wiki/Add-a-Custom-Service
*/
function checkUnread() {
// Check for an unread count by looking for the dot favicon
var unread = document.querySelectorAll("link[href^='favicon-dot-32x32']")
// Get the document title
@scottwd9
scottwd9 / building-evolutionary-architectures.md
Created August 13, 2018 12:28
Building Evolutionary Architectures

Building Evolutionary Architectures

Chapter 1 - Software Architecture

Architecture is 'the important stuff, whatever that is' or 'the parts that are hard to change later'. An architect analyzes business, domain, and other requirements to develop solutions that satisfy a list of prioritized architectural characteristics (-ilities). We should consider time and change with respect to architecture, or evolvability.

Software ecosystems are in a state of dynamic equilibrium. New languages, tools, methods constant force new equilibriums to emerge (free OS, linux, + free operations, puppet, led to the shift to containers). The pace of change in technology is constantly and rapidly changing in unexpected ways. We should architect systems knowing the landscape will change. Make ease of change a principal of architecture, remove the 'hard to change' definition of architecture.

An evolutionary architecture supports guided, incremental change across multiple dimensions. Evolvability is a meta characteristic that

@YasinPatel
YasinPatel / module.php
Last active January 16, 2019 07:48
Module wise Error Page in Yii2
Yii::$app->errorHandler->errorAction = 'studconsult/default/error';
<?php
namespace app\modules\admin;
class Module extends \yii\base\Module
{
public $controllerNamespace = 'app\modules\admin\controllers';
@RinatMullayanov
RinatMullayanov / Dockerfile
Last active August 1, 2023 22:13
Ubuntu Node.js Dockerfile
#
# Ubuntu Node.js Dockerfile
#
# https://github.com/dockerfile/ubuntu/blob/master/Dockerfile
# https://docs.docker.com/examples/nodejs_web_app/
#
# Pull base image.
FROM ubuntu:14.04
@jamband
jamband / PostController.php
Created May 26, 2015 11:02
Yii 2: Ajax + Delete
<?php
class PostController extends Controller
{
// ...
public function actionDelete($id)
{
$this->findModel($id)->delete();
if (!Yii::$app->request->isAjax) {
return $this->redirect(['index']);
@dbaeck
dbaeck / lumen_in_subfolder.md
Created May 6, 2015 10:25
Howto deploy Lumen projects within a subfolder (on a shared hoster)

Howto deploy Lumen projects within a subfolder (on a shared hoster)

For Lumen (5.0.8) (Laravel Components 5.0.*)

Use Case: Deploying Lumen App to Shared Hoster such that it can be called via domain.tld/lumenapp/...

Folder Layout

  • Rename public to desired name (new root folder, for example lumenapp)
  • Move everything else into a new folder, named e.g. project_src
@maxivak
maxivak / 00. tutorial.md
Last active April 12, 2024 05:42
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
#!/bin/bash
#
# Automate mysql secure installation for debian-baed systems
#
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.
@mheadd
mheadd / dataset-management.md
Last active October 12, 2023 07:53
Sample API calls for creating, updating and deleting things in CKAN via the CKAN API.

Get package list

~$ curl http://www.civicdata.com/api/action/package_list

Get package details

~$ curl http://www.civicdata.com/api/action/package_show?id={package_id}

Upload a file to storage

~$ curl http://www.civicdata.com/api/storage/auth/form/testdata/test.csv -H "Authorization: <API-KEY>"
@manishtpatel
manishtpatel / main.go
Last active October 18, 2023 03:12
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)