Skip to content

Instantly share code, notes, and snippets.

Avatar

Foad Sojoodi Farimani Foadsf

View GitHub Profile
@Foadsf
Foadsf / CMakeLists.txt
Last active Jun 21, 2020
small clinfo, fetching OpenCL platfroms and theri device's infomation
View CMakeLists.txt
cmake_minimum_required(VERSION 3.1)
project(OpenCL_Example)
find_package(OpenCL REQUIRED)
include_directories(${OpenCL_INCLUDE_DIRS})
link_directories(${OpenCL_LIBRARY})
add_executable(main main.c)
target_include_directories(main PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
@Foadsf
Foadsf / test.adoc
Created Apr 4, 2020
test HTML iframe asciidoc
View README.md

Unfortunately, the field of mechanical engineering, in general, has been very alien towards Free, Libre, and Open-Source CAD Software (FLOSS). As a FLOSS user and advocate, I have been personally harassed and ridiculed in my workplace many times in real life. But here on the internet, we should not tolerate bigotry and suppression.

The r/cad subreddit is very hostile against Free, Libre, and Open-Source CAD Software (FLOSS). They had previously banned Kurt Kremitzki, one of the FreeCAD developers and Debian package maintainers (this tweet). While ago I posted this in support of FLOSS CAD/CAE developers and inviting others to contribute by donation. However, my post was immediately removed with no explanation as I have described [here](https://www.reddit.com/r/opensource/comments/ckkl5e/supporting_free_libre_and_open_sourc

@Foadsf
Foadsf / example.sql
Created Mar 27, 2020
MySQL While Loop
View example.sql
SET @year = 2020;
DELIMITER $$
DROP PROCEDURE IF EXISTS reapeatEvent;
CREATE PROCEDURE reapeatEvent()
BEGIN
WHILE (@year < 2030) DO
@Foadsf
Foadsf / README.md
Last active Sep 22, 2020 — forked from nrollr/MySQL_macOS_Sierra.md
Installing MySQL and MySQL Workbench on macOS using Homebrew
View README.md

Preface

This procedure explains how to install MySQL and MySQL Workbench using Homebrew on macOS. This is a fork of these instructions, to make them more concise and solve the issues reported here.

MySQL

To install MySQL enter :

  • brew install mysql
  • brew services start mysql
  • then run mysql_secure_installation and follow the instructions
@Foadsf
Foadsf / test_file_one.txt
Created Mar 24, 2020
trying to git branch, checkout, and rename a folder in abash script
@Foadsf
Foadsf / dev.py
Last active Mar 8, 2020 — forked from JannieT/dev.py
Environment for scripting LibreOffice with Python
View dev.py
import uno
import sys
def createUnoService(id):
ctx = getContext()
return ctx.ServiceManager.createInstanceWithContext(id, ctx)
def getContext():
# get the uno component context from the PyUNO runtime
localContext = uno.getComponentContext()
@Foadsf
Foadsf / README.md
Last active Aug 19, 2020
Scripting LibreOffice with Python
View README.md

This tutorial was originally written by Jannie Theunissen on onesheep.org. However, the website has been down for a while and this a clone from the web.archive.org backup. Also, the parts regarding the macOS are updated according to this post. You may find OneSheep here on Twitter and Jannie Theunissen here on StackOverflow. If you have any comments on this Gist please poke me here on Twitter, otherwise, I might miss your comments.

Scripting LibreOffice with Python

We were recently asked to automate some editing tasks for the Spotlight English editors w

@Foadsf
Foadsf / CMakeLists.txt
Last active Feb 5, 2020
testing command line arguments double pointer type casting for pybind11
View CMakeLists.txt
cmake_minimum_required(VERSION 2.8.12)
project (example)
find_package(pybind11 REQUIRED)
pybind11_add_module(${PROJECT_NAME} example.cpp)
@Foadsf
Foadsf / EFT.ipynb
Last active Oct 19, 2019
Easy Fourier transform: implementing 3Blue1Brown's interpretation
View EFT.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.