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
  • 09:09 (UTC +04:00)
  • X @X4AES
  • X @SomeCapitalX
View GitHub Profile
@X4
X4 / git-mysql-howto.md
Last active December 19, 2015 06:49
Git Dude and Git MySQL HowTo https://github.com/sickill/git-dude

Hi!

I have lots of repositories locally and on my servers, but I follow even more repositories and I contribute to some here and there. That's why I've the need to stay notified when there is a change. But I don't want to actively follow through RSS or E-Mail. A commit notification isn't worth bloating my inbox even more.

For those who don't know, there is a cool way to keep notified of commits etc. and to exchange messages. You can use IRC in combination with a git hook through cia.vc/ or github.com/ itself, even bitbucket.org supports it now. Otherwise just setup an eggdrop, supybot or the phergie IRC Bot and write a script for it. You can share it here if you want.

It's obvious that a snapshot of your application only makes sense when you also add a database snapshot to it. That's why I'll explain howto create a git hook to take database dumps on each commit or tag.

GIT based Database version control.

Go to the hidden .git folder in your project, then a sub folder in there called hooks

@akatzbreaker
akatzbreaker / nltpe.py
Created June 24, 2013 09:58
Natural Language Time Parser (in English!)
import re, fileinput
import pyPEG
from pyPEG import parse, parseLine
from pyPEG import keyword, _and, _not, ignore
import datetime
## Taken from https://gist.github.com/bertspaan/3059017 and translated to English. It is Working well BUT if you find any errors, please comment!
numbers = [
"zero",
@ryanj
ryanj / openshift.npm.md
Last active November 22, 2017 19:55
A Git-based workflow for making your existing Open Source node.js application OpenShift-compatible.

Want to deploy an existing node.js Github project on OpenShift?

Give this recipe a try:

Add our OpenShift starter-code to your existing GitHub-hosted node.js application code:

cd $YOUR_PROJECT_FOLDER # This script assumes that your project is a git repo, with a git remote hosted on github.com
git remote add upstream -m master [email protected]:ryanj/nodejs-custom-version-openshift.git
git pull -s recursive upstream master # merge in a basic OpenShift skeleton
@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:
@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"
@MoOx
MoOx / less2stylus.js
Created August 27, 2012 17:37 — forked from lancejpollard/less2stylus.coffee
Convert LESS to Stylus
// Usage : less2stylusDir('../src/css/');
var fs = require('fs');
// this less 2 stylus conversion script make a stylus easy to read syntax
// - let the braces
// - replace the @ for var as $
// - let semicolons
function less2stylus(less)
@asajeffrey
asajeffrey / Demo.agda
Created March 9, 2012 02:54
A Demonstration of Agda
-- A Demonstration of Agda
--
-- Alan Jeffrey <[email protected]>
--
-- Agda is:
-- * a foundation of mathematics
-- * a programming language
--
-- Foundationally:
-- * Constructive logic
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 26, 2025 19:13
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@rampion
rampion / try-catch-ex.c
Created April 8, 2009 02:35
TRY/CATCH/FINALLY macros for C
// gcc -o try-catch-ex try-catch.c try-catch-ex.c
#include <stdio.h>
#include "try-catch.h"
// Example of use for try-catch.h
int main(int argc, char *argv[])
{
int i = 101;
printf("before try block...\n");