This file contains hidden or 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
(defun init-pandoc-convert-to-org-file-and-view (fname) | |
"Enables support for viewing files (such as docx or epub files) | |
via conversions using pandoc (by converting them to org files)" | |
(interactive "fEnter name of file to be converted to org file for viewing: ") | |
;; (print (concat "fname: " fname)) | |
(let* ((base-file-name (file-name-base fname)) | |
(output-file-name (concat (make-temp-file base-file-name t) "/" base-file-name ".org")) | |
(pandoc-conversion-command (concat "pandoc \"" | |
fname | |
"\" -t org -o \"" |
This file contains hidden or 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 std.file, std.stdio; | |
immutable string programInformation = "Searches for files based on their names.\n" | |
~ "Search case sensitivity depends on the OS (macOS and Windows are case-insensitive while non-macOS POSIX systems are case-sensitive).\n\n" | |
~ "OPTIONS:"; | |
immutable string versionInformation = "Filename Searcher (find_file) 1.0.1\n" | |
~ "Copyright (C) 2022 Preetpal Sohal.\n" | |
~ "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n" | |
~ "This is free software: you are free to change and redistribute it.\n" |
This file contains hidden or 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
;;; font-lock+.el --- Enhancements to standard library `font-lock.el'. | |
;; | |
;; Filename: font-lock+.el | |
;; Description: Enhancements to standard library `font-lock.el'. | |
;; Author: Drew Adams | |
;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com") | |
;; Copyright (C) 2007-2018, Drew Adams, all rights reserved. | |
;; Created: Sun Mar 25 15:21:07 2007 | |
;; Version: 0 | |
;; Package-Requires: () |
This file contains hidden or 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
// Compile with: cl /O2 /GL src\main.c | |
#include "stdbool.h" | |
// #include "stdio.h" | |
#include "windows.h" | |
#include "winuser.h" | |
#pragma comment( lib, "user32.lib") |
This file contains hidden or 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
// Compilation tested with ldc2 and dmd. D BetterC compatible. | |
// I compile with: ldc2 -O3 -release -mcpu=native -m64 -betterC -static main.d | |
// import core.stdc.stdio : printf; | |
// import std.stdio; | |
import core.sys.windows.windows; | |
import core.sys.windows.winuser; | |
pragma(lib, "user32.lib"); |
This file contains hidden or 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
;; Provides workarounds for some bugs | |
;; Fixes issues related to not being able to connect to HTTPS (use at your own risk) | |
(when (version< emacs-version "26.3") | |
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")) | |
;; Fixes issue in certain packages related to change listed in Emacs news (for Emacs 28): | |
;; ** The WHEN argument of 'make-obsolete' and related functions is mandatory. | |
;; The use of those functions without a WHEN argument was marked obsolete |
This file contains hidden or 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
# frozen_string_literal: true | |
commands = [ | |
'brakeman -w3', | |
'rubocop -ac .rubocop.yml', | |
'reek -c .reek.yml' | |
] | |
# Note if any of the commands does not exit with 0, the whole process fails | |
commands.each do |command| |
This file contains hidden or 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
*** RSA | |
# Generate self-signed certificate with RSA 4096 key-pair | |
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout rsakey.pem -out rsacert.pem | |
# print private and public key | |
openssl rsa -in rsakey.pem -text -noout | |
# print certificate | |
openssl x509 -in rsacert.pem -text -noout |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'ostruct' | |
class RandomPasswordGenerator | |
VERSION = %w(0.1.0) | |
CORE_CHARACTER_SET = [('a'..'z').to_a, | |
('A'..'Z').to_a, |
NewerOlder