Skip to content

Instantly share code, notes, and snippets.

View aneek's full-sized avatar

Aneek Mukhopadhyay aneek

View GitHub Profile
@aneek
aneek / etc-init.d-hello-world
Created December 15, 2019 07:00 — forked from josephspurrier/etc-init.d-hello-world
/etc/init.d Script for Go Application
#!/bin/bash
#
# chkconfig: 35 95 05
# description: Hello world application.
# Run at startup: sudo chkconfig hello-world on
# Load functions from library
. /etc/init.d/functions
make -C tools
make[1]: Entering directory '/home/aneek/Downloads/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/aneek/Downloads/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
/home/aneek/Downloads/mt7610u_wifi_sta_v3002_dpo_20130916/tools/bin2h
chipset = mt7650u
chipset = mt7630u
chipset = mt7610u
cp -f os/linux/Makefile.6 /home/aneek/Downloads/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/Makefile
make -C /lib/modules/4.15.0-20-generic/build SUBDIRS=/home/aneek/Downloads/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux modules
@aneek
aneek / Directory structure
Created June 11, 2017 13:12
Docker Configurations
D:.
│ docker-compose.yml
│ Dockerfile
│ start.sh
├───conf
│ php-fpm.conf
│ services-api.conf
│ vhost.conf
$view = new view();
$view->name = 'manage_products';
$view->description = 'List of all products';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Manage Products';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
mysql> desc activation_code;
+----------------------------------+------------------+------+-----+-------------------+-----------------------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------------------+------------------+------+-----+-------------------+-----------------------------+
| product_group_id | int(11) | YES | MUL | NULL | |
| nid | int(10) unsigned | NO | PRI | NULL | auto_increment |
| activation_code | varchar(255) | YES | MUL | NULL | |
| uid | int(11) | YES | MUL | NULL | |
| status | int(11) | YES | | NULL | |
| created | int(11
phpize && ./configure && make && make test && make install && popd && popd && rm -rf ${OPENSHIFT_TMP_DIR}/Twig
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
This file has been truncated, but you can view the full file.
views_handler_clms_product_activation_total_subscriptions_field Object
(
[field_alias] => unknown
[aliases] => Array
(
)
[original_value] =>
[additional_fields] => Array
(
@aneek
aneek / lesson.json
Created November 5, 2015 10:05
Unit Level & Lesson Level Resource Representation
{
"lesson-id": "123456",
"_embedded": {
"contents": [
{
"content_id": "78901",
"path": "https://api.cambridgelms.org/v1/download"
},
{
"content_id": "98953",
@aneek
aneek / gist:b4ecd71f357ca47039b0
Created September 18, 2015 08:28
Routing alter D8
class RouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
$front_page = \Drupal::config('system.site')->get('page.front');
// Not getting the front value with the below process (followed: https://www.drupal.org/node/2187643)
$route = $collection->get('page.front');
@aneek
aneek / EditorImageDialogIntegrationTest
Created September 12, 2015 15:41
EditorImageDialogIntegrationTest
<?php
/**
* @file
* Contains \Drupal\editor\Tests\EditorImageDialogIntegrationTest.
*/
namespace Drupal\editor\Tests;
use Drupal\simpletest\WebTestBase;
use Drupal\editor\Entity\Editor;