Skip to content

Instantly share code, notes, and snippets.

View Jacajack's full-sized avatar
🦄

Jacek Wieczorek Jacajack

🦄
View GitHub Profile
@leoloobeek
leoloobeek / get_gists.py
Created April 26, 2017 21:34
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
@mario52a
mario52a / Macro_FCCircularText.FCMacro
Last active November 17, 2023 17:37
This macro writes a text, standing or flat, circumferential or helical in the manner of Trajan Column and creates a clock with Arabic numerals 1 2 3 ... or Roman I II III ... (inspired to Macro to Create Clock Face to cblt2l). Also to follow the path with selection one wire, edge, line, circle.
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) 2014 2015 2016 2017 2018 2019 2020 2021 2022 <mario52> *
* 2023 *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
@oleksiiBobko
oleksiiBobko / tcp_server.c
Last active November 10, 2023 08:48
Simple socket server in C using threads (pthread library) Compiles on linux
/*
C socket server example, handles multiple clients using threads
Compile
gcc server.c -lpthread -o server
*/
#include<stdio.h>
#include<string.h> //strlen
#include<stdlib.h> //strlen
#include<sys/socket.h>
@metacollin
metacollin / ltspice.md
Last active April 30, 2022 10:28
LTSpice color scheme - Twilight After Dawn

screenshot

LTSpice color scheme - Twilight After Dawn

                |  R    |  G    |  B    |
Wires           |  138  |  154  |  149  |
Junctions       |  152  |  205  |  255  |
Component body  |  207  |  106  |  76   |
Graphic Flag | 218 | 239 | 163 |
/* So how does this work?
I'm using ANSI escape sequences to control the behavior of the terminal while
cat is outputting the text. I deliberately place these control sequences inside
comments so the C++ compiler doesn't try to treat them as code.*/
//
/*The commands in the fake code comment move the cursor to the left edge and
clear out the line, allowing the fake code to take the place of the real code.
And this explanation uses similar commands to wipe itself out too. */
//
#include <cstdio>
@luca-m
luca-m / .Xresources
Created July 9, 2013 13:52
.Xresources for urxvt, clipboard CTRL+SHIFT+(C|V|X), CTRL+Arrow for word cursor movement
!! cd /usr/lib/urxvt/perl; git clone https://github.com/muennich/urxvt-perls .
!! Perl extensions
URxvt.perl-ext-common: default,clipboard,matcher,keyboard-select
!! URLs
URxvt.keysym.C-U: perl:url-select:select_next
URxvt.url-launcher: /usr/bin/firefox -new-tab
URxvt.underlineURLs: True
URxvt.matcher.button: 1