Skip to content

Instantly share code, notes, and snippets.

View X4's full-sized avatar
:shipit:
❯ Building Some Capital

X4 X4

:shipit:
❯ Building Some Capital
  • (𝙰𝙸, 𝙲𝙼𝙿𝚁𝚂𝚂𝙽, 𝙲𝚛𝚢𝚙𝚝𝚘)
  • Dubai, UAW
  • 10:31 (UTC +04:00)
  • X @X4AES
  • X @SomeCapitalX
View GitHub Profile
# Create a new AnnotatedTimeLine chart
@chart = GoogleVisualr::AnnotatedTimeLine.new
# Add Column Headers
@chart.add_column('date' , 'Created at')
@chart.add_column('number', 'Open')
@chart.add_column('number', 'Close')
@chart.add_column('number', 'High' )
@chart.add_column('number', 'Low' )
@chart.add_column('number', 'Volume')
@X4
X4 / git-rename.sh
Created July 22, 2011 01:32
rename name and email of committer and author in your git history.
#! /bin/bash
################################################################################
# @description This little helper can interactively guide you to rename
# name and email of committer and author in your git history.
# @author Fernandos https://github.com/X4
################################################################################
echo "----------------------------------------"
echo "Rename [0] name / [1] email / [2] both "
echo "----------------------------------------"
@X4
X4 / servlet.c
Created September 13, 2011 09:55
POST bug in google chrome/chromium
#include "gwan.h"
int main(int argc, char *argv[])
{
xbuf_t *reply = get_reply(argv);
xbuf_cat(reply,
"<form method='POST'>"
"<input name='post' type='text' value='Testing POST' />"
"<input type='submit' value='POST'/>"
@X4
X4 / body-shadow.css
Created September 18, 2011 04:53
Addressbar CSS Shadow screenshot --> http://imgur.com/5CiUE
body {
font: 13px/19px Arial, sans-serif;
color: #666666;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none; /* Fix for webkit rendering */
}
body:before {
content: "";
position: fixed;
top: -10px;
@X4
X4 / service-helper.zsh
Last active October 5, 2015 05:47
Bash service helper script
start() { for arg in $*; do sudo /etc/rc.d/rc.$arg start; done }
stop() { for arg in $*; do sudo /etc/rc.d/rc.$arg stop; done }
restart() { for arg in $*; do sudo /etc/rc.d/rc.$arg restart; done }
run() { for arg in $*; do sudo /etc/rc.d/rc.$arg run; done }
test() { for arg in $*; do sudo /etc/rc.d/rc.$arg test; done }
status() { for arg in $*; do sudo /etc/rc.d/rc.$arg status; done }
@X4
X4 / gwan
Last active December 10, 2015 02:48
Linux service control script
#!/usr/bin/env bash
# Start/stop/restart TrustLeap G-WAN Application Server.
# @date 2012-12-24
# @author Ferhat
# @version 0.98
##########################################################
# This is the directory you installed gwan into
DIR="/opt/gwan"
@X4
X4 / iwlwifi.sh
Created January 15, 2013 22:04
Fixes problems with the iwlwifi driver stalling on Kernels 3.6+ Error: iwlwifi 0000:04:00.0: fail to flush all tx fifo queues
#!/bin/bash
ifconfig wlan0 down && sleep 1
ifconfig wlan0 up && sleep 1
echo "Reset WiFi"
rmmod iwldvm && sleep 1
rmmod iwlwifi && sleep 1
echo "Remove Intel kernel modules"
@X4
X4 / .bashrc
Created March 9, 2013 14:43 — forked from jashkenas/.bashrc
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@X4
X4 / krawall.sh
Last active January 7, 2018 09:55
Krawall is a "Wallpaper Changer" for all common desktop environments (xfce4, i3/xmonad, enlightenment (e17), gnome2, gnome3, kde3 and kde4)
#!/bin/bash
# -------------------------------------------------------
# @author X4
# @version 1.0
#
# HowTo:
# You can add a new GlobalHotkey to the media forward an back buttons for example.
# There are other ways to run this script: Button or Keypresses, Plasmoids, Events..
#
# Use these parameters when on XFCE for example:
#!/bin/bash
set -e
WALLPAPER_PATH="$HOME/Bilder/Sample Pictures/"
create_queue() {
find $WALLPAPER_PATH -type f -iregex '.*\.\(jpg\|gif\|png\|jpeg\)$' > /tmp/krawall_queue
}
shuffle_wallpapers() {