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
#!/bin/bash | |
usage () { | |
echo "Usage:" | |
echo " ${1} mysql-key db-name new-login new-login-password" | |
echo | |
echo "The mysql-key is typically in /etc/mysql/debian.cnf" | |
echo "The db-name is the database name that you would like the" | |
echo "new-login to have access to. The database will be created." | |
echo "new-login is the new login to create." |
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
#!/bin/bash | |
# In case you want to install from a the Oracle package repository. | |
oracle_install ( ){ | |
CODENAME=`lsb_release -c | cut -f 2` | |
eval sudo sh -c 'echo "deb https://download.virtualbox.org/virtualbox/debian ${CODENAME} contrib" >> /etc/apt/sources.list' | |
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - | |
sudo apt-get update && sudo apt-get install virtualbox-6.0 | |
} |
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
#include <iostream> | |
using namespace std; | |
// Passing by value | |
void print(int a){ | |
cout << "a is " << a << " and it's address is " << &a << endl; | |
} | |
// Passing by reference |
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 python3 | |
""" | |
Converts LaTeX math code to a URL that will render an image | |
via GitHub's math renderer URL. | |
Inspired by the discussion found at | |
https://gist.github.com/a-rodin/fef3f543412d6e1ec5b6cf55bf197d7b | |
""" | |
# | |
# Copyright 2020 Michael Shafae | |
# |
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
#include <iostream> | |
using namespace std; | |
int main(void){ | |
int x = 42; | |
cout << "int x is " << x << " and it is located at " << &x << endl; | |
cout << endl; |
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
#include <iostream> | |
using namespace std; | |
struct Foo{ | |
int a; | |
char b; | |
}; | |
int main(void){ |
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
#!/bin/bash | |
# | |
# Copyright 2021 Michael Shafae | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
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
""" | |
This is a setup.py script generated by py2applet | |
Usage: | |
python setup.py py2app | |
""" | |
import py2app.recipes | |
import py2app.build_app |
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
init-hook='import os, sys; sys.path.append("/opt/actions-runner/env/lib/python3.8/site-packages") if os.path.exists("/opt/actions-runner/env/lib/python3.8/site-packages") else sys.path.append("env/lib/python3.8/site-packages")' |
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
// Gist https://gist.github.com/59c6e8a6a446fa7c32b16203493d14be | |
#include <iostream> | |
#include <string> | |
int main(int argc, char const *argv[]) { | |
if (argc < 2) { | |
std::cout << "Please provide an argument.\n"; | |
return 1; |
OlderNewer