Skip to content

Instantly share code, notes, and snippets.

View scmanjarrez's full-sized avatar
🧠
hungry mind

Sergio C scmanjarrez

🧠
hungry mind
  • Spanish National Research Council (CSIC)
  • Madrid
View GitHub Profile
@scmanjarrez
scmanjarrez / gist:cbfa6900349c090fcaec
Created March 20, 2016 18:24
Decode/decypher MEGA mega://enc? links
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mega Decrypter</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css">
</head>
<body>
<div class="header">
@scmanjarrez
scmanjarrez / testerDMUTEX
Last active May 16, 2016 11:42
Corrector casero con las pruebas de la práctica DMUTEX (Sistemas Distribuidos)
#!/bin/bash
test_run() # Command [args...] [| Command...] [<2>> redirections...]
{
echo "$ $@"
[ -x $1 ] || (echo "No existe el ejecutable $1"; exit 1)
"$@" > .fd1 2> .fd2
xtatus=$?
return $xtatus
}
@scmanjarrez
scmanjarrez / lanzador_nuevo.sh
Created May 15, 2016 14:31
Corrector casero con las pruebas de la práctica SERVIDOR (Sistemas Operativos)
#!/bin/bash
#!/bin/zsh
########################################################################
# Descripción:
# Fichero auxiliar para el corrector.
#
########################################################################
PID_SRV=""
@scmanjarrez
scmanjarrez / guake zenburn theme
Last active January 27, 2024 08:42
guake terminal theme - zenburn
#!/bin/bash
gconftool-2 -s -t string /apps/guake/style/font/palette "#3F3F3F3F3F3F:#CCCC93939393:#7F7F9F9F7F7F:#E3E3CECEABAB:#DFDFAFAF8F8F:#CCCC93939393:#8C8CD0D0D3D3:#DCDCDCDCCCCC:#3F3F3F3F3F3F:#CCCC93939393:#7F7F9F9F7F7F:#E3E3CECEABAB:#DFDFAFAF8F8F:#CCCC93939393:#8C8CD0D0D3D3:#DCDCDCDCCCCC"
gconftool-2 -s -t string /apps/guake/style/font/color "#ffffffffffff"
gconftool-2 -s -t string /apps/guake/style/background/color "#2E2E34343636"
@scmanjarrez
scmanjarrez / git-clearHistory
Created December 8, 2017 01:12 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@scmanjarrez
scmanjarrez / guake bright colors
Last active August 2, 2020 10:19
guake bright colors
#!/bin/bash
#gconftool-2 -s -t string /apps/guake/style/font/palette "#263238:#ec407a:#8bc34a:#ffa726:#2196f3:#9575cd:#00bcd4:#eceff1:#617d8a:#ec407a:#9ccc65:#ffb74d:#42a5f5:#b39ddb:#26c6da:#ffffff"
#gconftool-2 -s -t string /apps/guake/style/font/color "#ffffffffffff"
#gconftool-2 -s -t string /apps/guake/style/background/color "#263238"
dconf write /apps/guake/style/font/palette "'#000000000000:#cccc00000000:#4e4e9a9a0606:#c4c4a0a00000:#34346565a4a4:#757550507b7b:#060698209a9a:#d3d3d7d7cfcf:#555557575353:#efef29292929:#8a8ae2e23434:#fcfce9e94f4f:#72729f9fcfcf:#adad7f7fa8a8:#3434e2e2e2e2:#eeeeeeeeecec:#ffffffffffff:#000000000000'"
@scmanjarrez
scmanjarrez / boot windows
Last active March 4, 2018 21:01
Change boot to grub from command line (windows)
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
if doesn't work, then:
bcdedit /deletevalue {bootmgr} path \EFI\ubuntu\grubx64.efi
@scmanjarrez
scmanjarrez / filter_monitor.js
Created March 14, 2018 17:06
filter alt+tab by monitor, need Alternatetab addon
// https://www.reddit.com/r/gnome/comments/507bqd/only_feature_im_missing_alttab_filterd_by_monitor/
// open lg and copypaste this
imports.ui.altTab.WindowSwitcherPopup.prototype._getWindowList = function() {
let workspace = this._settings.get_boolean('current-workspace-only') ? global.screen.get_active_workspace() : null;
let allWindows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
allWindows = allWindows.filter(w => w.get_monitor() === global.screen.get_current_monitor());
return allWindows;
}
@scmanjarrez
scmanjarrez / radare.md
Last active May 4, 2018 00:48
radare cheatsheet (official cheatsheet)

Radare2

Command line options

-L: List of supported IO plugins
-q: Exit after processing commands
-w: Write mode enabled
-i [file]: Interprets a r2 script
-A: Analyze executable at load time (xrefs, etc)
-n: Bare load. Do not load executable info as the entrypoint
@scmanjarrez
scmanjarrez / setColorsSiko.py
Created May 11, 2018 02:03
change colors of calls and crypto-xor in IDA Pro, from https://practicalmalwareanalysis.com/setcolorssiko-py/
from idautils import *
from idc import *
#Color the Calls off-white
heads = Heads(SegStart(ScreenEA()), SegEnd(ScreenEA()))
funcCalls = []
for i in heads:
if GetMnem(i) == "call":
funcCalls.append(i)
print "Number of calls: %d" % (len(funcCalls))