Skip to content

Instantly share code, notes, and snippets.

View romildo's full-sized avatar

José Romildo Malaquias romildo

View GitHub Profile
uint n = tamanho de decs;
uint i = 0;
while (i < n) {
if (decs[i] é função) {
uint i_saved = i;
while (decs[i] é função) {
colocar decs[i] na tabela de símbolos;
i = i + 1;
}
@romildo
romildo / test.cpp
Last active May 11, 2019 12:35
using an environment variable to obtain the plugin files
void PluginManager::load()
{
QStringList pluginsDirs = QProcessEnvironment::systemEnvironment().value("DDE_POLKIT_PLUGINS_DIRS").split(':');
pluginsDirs.append("/usr/lib/polkit-1-dde/plugins/");
for (const QString &dirName : pluginsDirs) {
QDir dir(dirName);
QFileInfoList pluginFiles = dir.entryInfoList((QStringList("*.so")));
@romildo
romildo / deepin.nix
Created April 19, 2019 01:42
/alt/nixpkgs/nixos/modules/services/desktops/deepin/deepin.nix
# deepin
{ config, pkgs, lib, ... }:
{
###### interface
options = {
@romildo
romildo / configuration.deepin.nix
Created April 3, 2019 03:52
configuration for a vm for deepin in NixOS
{ config, pkgs, ... }:
{
imports = [
];
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@romildo
romildo / configure
Created August 26, 2017 13:16
/tmp/nix-build-libebml-1.3.5.drv-0/libebml-1.3.5/configure
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libebml 1.3.5.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@romildo
romildo / CMakeLists.txt
Created February 20, 2017 22:53
CMake cannot find ncurses in NixOS: CMakeLists.txt
cmake_minimum_required(VERSION 3.6)
project(eplan-c++)
find_package(Curses REQUIRED)
@romildo
romildo / configuration.nix
Created September 5, 2016 12:30
configuration.nix
nixpkgs.config = {
allowUnfree = true;
# ...
};
nixpkgs.config.packageOverrides = pkgs: rec {
pkgs_master = import /alt/nixpkgs {};
# ...
idea = pkgs_master.idea;
};
@romildo
romildo / configuration.nix
Created June 17, 2016 20:36
Excerpt from configuration.nix
nixpkgs.config.packageOverrides = pkgs: rec {
#haskellPackages = pkgs.haskellPackages;
haskellPackages = pkgs.haskell.packages.ghc7103;
myHaskellEnv = haskellPackages.ghcWithHoogle (
haskellPackages: with haskellPackages; [
cabal-install
ghc-mod
HaTeX
hlint
@romildo
romildo / gist:962951e37fe673632010f29e5ce56cd3
Created June 9, 2016 16:10
Conflicts when updating packages
# emerge -auvADNt --keep-going --with-bdeps=y --backtrack=100 @world
These are the packages that would be merged, in reverse order:
Calculating dependencies... done!
[ebuild U ] www-client/opera-38.0.2220.29::gentoo [37.0.2178.54::gentoo] LINGUAS="af az be bg bn ca cs da de el en_GB en_US es es_419 fi fil fr fr_CA fy gd he hi hr hu id it ja kk ko lt lv me mk ms nb nl nn pa pl pt_BR pt_PT ro ru sk sr sv sw ta te th tr uk uz vi zh_CN zh_TW zu" 48,130 KiB
[nomerge ] app-text/texlive-2015::gentoo USE="X graphics humanities luatex music png pstricks science tex4ht truetype xetex xml -cjk -context -detex -dvi2tty -epspdf -extra -games -jadetex -metapost -omega -pdfannotextractor -publishers -texi2html -xindy" LINGUAS="en fr pt -af -ar -as -bg -bn -br -ca -cs -cy -da -de -el -en_GB -eo -es -et -eu -fa -fi -ga -gl -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -kn -ko -la -lo -lt -lv -ml -mn -mr -nb -nl -nn -no -or -pa -pl -rm -ro -ru -sa_IN -sco -sk -sl -sq -sr -sv -ta -te -th -tk -tr -uk -vi -zh"
[
@romildo
romildo / gist:a2f720eb007b4a093cb9
Created February 23, 2016 23:45
# nix-store -q --tree /root/result
# nix-store -q --tree /root/result
/nix/store/vn67sv6lhq081nan6gqc0m8csk1vv858-nixos-system-jrm.no-ip.org-16.03pre75806.77f8f35
+---/nix/store/f5c5g9ibxpnsx259fpypdj2djfz1zd4g-linux-4.4
+---/nix/store/0fa7wdh6wrqhc93hrm85ir48nrs5gyld-kernel-modules
| +---/nix/store/f5c5g9ibxpnsx259fpypdj2djfz1zd4g-linux-4.4 [...]
+---/nix/store/1hzvalfcpsrymaclgf1szqbsfrxvps4j-setup-etc.pl
+---/nix/store/n2wxp513rr00f6hr2dy0waqahns49dch-glibc-2.21
| +---/nix/store/rjq7dpdhgljjhv730bpqkvn63h1c57bp-linux-headers-3.18.14
| | +---/nix/store/rjq7dpdhgljjhv730bpqkvn63h1c57bp-linux-headers-3.18.14 [...]
| +---/nix/store/n2wxp513rr00f6hr2dy0waqahns49dch-glibc-2.21 [...]