This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile template for a shared library in C | |
# https://www.topbug.net/blog/2019/10/28/makefile-template-for-a-shared-library-in-c-with-explanations/ | |
CC = gcc # C compiler | |
CFLAGS = -fPIC -Wall -Wextra -O2 -g # C flags | |
LDFLAGS = -shared # linking flags | |
RM = rm -f # rm command | |
TARGET_LIB = libtarget.so # target lib | |
SRCS = main.c src1.c src2.c # source files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* == Altered == | |
* assign() is overloaded in c++. Changed assign(n, u) to | |
* assign_val(n, u); | |
* | |
* The insert and erase function use index instead of iterator | |
* to determine where stuff is inserted/erased | |
* | |
* == Not implemented == | |
* any operator overloading, obviously |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR="${HOME}/images/screenshots" | |
DATE="$(date +%Y%m%d-%H%M%S)" | |
NAME="${DIR}/screenshot-${DATE}.png" | |
LOG="${DIR}/screenshots.log" | |
# Check if the dir to store the screenshots exists, else create it: | |
if [ ! -d "${DIR}" ]; then mkdir -p "${DIR}"; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $XDG_CONFIG_HOME/xkb/symbols/custom | |
// Makes ALT + CAPS_LOCK act as 3rd level switch | |
// Works sporadically | |
partial modifier_keys | |
xkb_symbols "alt_caps_mode_switch" { | |
key <CAPS> { | |
type[Group1]="PC_ALT_LEVEL2", | |
[ Caps_Lock, ISO_Level3_Shift ] | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "dropline-status-icon.h" | |
G_DEFINE_TYPE(DroplineStatusIcon, dropline_status_icon, GTK_TYPE_STATUS_ICON) | |
struct _DroplineStatusIconPrivate | |
{ | |
/* | |
* XXX: Put stuff you need during runtime here. | |
*/ | |
gpointer dummy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bb.cascades 1.0 | |
Page { | |
property alias label5 : label5 | |
Container { | |
layout: DockLayout {} | |
Label { | |
id: label5 | |
text: "Hello World" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* WebServer.c | |
* | |
* Created on: Nov 3, 2012 | |
* Author: pavithra | |
* | |
* A web server in C language using only the standard libraries. | |
* The port number is passed as an argument. | |
* | |
* http://css.dzone.com/articles/web-server-c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Filename: name-theme.el | |
(deftheme name | |
"DOCSTRING") | |
;; Not a bad idea to define a palette... | |
(let ( | |
(color-1 "#ffffff") | |
(color-2 "#ff0000") | |
(color-3 "#00ff00") | |
(color-4 "#0000ff")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//============================================================================ | |
// Name : OctaneCrawler.cpp | |
// Author : Berlin Brown (berlin dot brown at gmail.com) | |
// Version : | |
// Copyright : Copyright Berlin Brown 2012-2013 | |
// License : BSD | |
// Description : This is the simplest possible web crawler in C++ | |
// Uses boost_regex and boost_algorithm | |
//============================================================================ |