Skip to content

Instantly share code, notes, and snippets.

View trappedinspacetime's full-sized avatar
🏠
Working from home

Kenn trappedinspacetime

🏠
Working from home
  • For Personal Use
  • Istanbul
View GitHub Profile
flatpak run --command=sh --arch=i386 org.videolan.VLC
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
sh-4.3$ vlc -vvv
VLC media player 3.0.0-git Vetinari (revision 2.2.0-git-14263-g954ec0a4e9)
[099f5270] core libvlc debug: VLC media player - 3.0.0-git Vetinari
[099f5270] core libvlc debug: Copyright © 1996-2017 the VideoLAN team
[099f5270] core libvlc debug: revision 2.2.0-git-14263-g954ec0a4e9
[099f5270] core libvlc debug: configured with ./configure '--prefix=/app' 'BUILDCC=/usr/bin/gcc -std=gnu99' 'LDFLAGS=-L/app/lib ' 'PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig'
[099f5270] core libvlc debug: searching plug-in modules
[099f5270] core libvlc debug: loading plugins cache file /app/lib/vlc/plugins/plugins.dat
flatpak run --devel --command=sh org.videolan.VLC
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
sh-4.3$ which vlc
/app/bin/vlc
sh-4.3$ file /app/bin/vlc
/app/bin/vlc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=6b12d6fae21ee88e4cc9117504f2b384ce41dfa9, stripped
sh-4.3$ gdb vlc
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
(gdb) bt
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
Python Exception <class 'SystemError'> <built-in function isinstance> returned a result with an error set:
#0 0xffffffff in #1 0xffffffff in #2 0xffffffff in #3 0xffffffff in #4 0xffffffff in #5 0xffffffff in #6 0xffffffff in
#!/bin/bash
until [ 1 -eq 2 ]; do
# Script to randomly set Background from files in a directory
# Directory Containing Pictures
DIR="/home/mhgsys/Desktop/bcground/"
# Command to Select a random jpg file from directory
# Delete the *.jpg to select any file but it may return a folder
trabzonspor@kenn:~/NewDesktop/Ocak-2018$ docker pull dockcross/linux-x64:latest
latest: Pulling from dockcross/linux-x64
f49cf87b52c1: Already exists
66712b35fb07: Pull complete
dc6afe6ada64: Pull complete
144fe00ffbac: Pull complete
303e851508d7: Pull complete
f025ea80235e: Pull complete
a155303ec06f: Pull complete
b8c0dc0561e8: Pull complete
@trappedinspacetime
trappedinspacetime / build_cross_gcc
Created January 29, 2018 20:00 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
@trappedinspacetime
trappedinspacetime / web-servers.md
Created February 11, 2018 12:47 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@trappedinspacetime
trappedinspacetime / translate.sh
Created February 24, 2018 15:56
Translate vala project (including appdata.xml and .desktop files) with Gettext and bash script
#!/bin/bash
# Script for easy developing by Carlos Suárez ([email protected]) - 2018
# Define variables
PACKAGE="myapplication"
TEMPLATE=po/$PACKAGE.pot
FILES=po/*.po
# Search strings to translate and update po files (mark with _ translatable fields in appdata file)
# p.ex.: <_li>My Application do something</_li><_li>Also do something more</_li>
# Don't use _ to <name> and <summary>.
MYVAR=$(find . -type f -name *vala -or -name *appdata.xml.in -or -name *desktop.in)
@trappedinspacetime
trappedinspacetime / instructions.markdown
Created March 7, 2018 17:09 — forked from hijonathan/instructions.markdown
Steps to transfer Chrome Custom Search Engines to Alfred

Step 0: Quit Chrome

Step 1: Get a dump of your search engines

> pwd
/Users/jonathankim/Desktop

> sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/Web\ Data
sqlite3> .output chrome_export.sql

sqlite3> .dump keywords

@trappedinspacetime
trappedinspacetime / removechars.sql
Created May 12, 2018 17:29 — forked from mitchellhislop/removechars.sql
Removing special characters in MySQL
# FIRST, REPLACE UTF-8 characters.
UPDATE `t` SET `c` = REPLACE(`c`, 0xE28098, "'");
UPDATE `t` SET `c` = REPLACE(`c`, 0xE28099, "'");
UPDATE `t` SET `c` = REPLACE(`c`, 0xE2809C, '"');
UPDATE `t` SET `c` = REPLACE(`c`, 0xE2809D, '"');
UPDATE `t` SET `c` = REPLACE(`c`, 0xE28093, '-');
UPDATE `t` SET `c` = REPLACE(`c`, 0xE28094, '--');
UPDATE `t` SET `c` = REPLACE(`c`, 0xE280A6, '...');
# NEXT, REPLACE their Windows-1252 equivalents.
UPDATE `t` SET `c` = REPLACE(`c`, CHAR(145), "'");