Skip to content

Instantly share code, notes, and snippets.

View bascht's full-sized avatar
📢
Setting all the statuses.

Sebastian Schulze bascht

📢
Setting all the statuses.
View GitHub Profile
Lorem ipsum dolor sit amet, consectetur adi|piscing elit.
; jump from here --------------------------^
Lorem ipsum dolor sit amet, consectetur| adipiscing elit.
; to here -----------------------------^
[alias]
lol= 'log' '--oneline' '--graph' '--decorate'
lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit
log= 'log' '--decorate' '--pretty=full'
me = $GIT_AUTHOR_NAME
lg = log --pretty=format:'%Cred%h%Creset - %Cgreen(%cr)%Creset%C(yellow)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit --graph
lg-me = !git lg --author=\"$GIT_AUTHOR_NAME\"
today-all = !git lg --all --since='12am'
lg-day = "!f() { git lg-me --all --after=\"${1-(date \"+%Y-%m-%d\")} 00:00\" --before=\"${1-(date \"+%Y-%m-%d\")} 23:59\"; }; f"
@bascht
bascht / Karnevalscomputerseminarpackliste.org
Created February 11, 2015 12:24
Karnevalscomputerseminarpackliste

Snacks

  • [ ] Beef Jerkey
  • [ ] Doppelkekse
  • [ ] Gummibärchen
  • [ ] Waffeln

Technik

  • [ ] AirPort Express
  • [ ] Kopfhörer
  • [ ] Ladegerät
  • [ ] Laptop
$ drush -d @myalias solr-index
Bootstrap to phase 0. [0 sec, 2.18 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 2.31 MB] [bootstrap]
Loaded alias @myalias from file /home/drupal/.drush/aliases.drushrc.php [0.01 sec, 2.32 MB] [notice]
Cache HIT cid: 5.10.0-commandfiles-0-afca815239e5d26eaa4f64880a91114b [0.02 sec, 2.33 MB] [debug]
Begin redispatch via invoke process [0.08 sec, 5.27 MB] [notice]
Backend invoke: ssh -o PasswordAuthentication=no myhost 'drush --invoke --debug [command]
--root=/var/www/current/drupal-cms/ --uri=www.myhost.com --verbose 2>&1' 2>&1 [0.16 sec, 5.28 MB]
executing ssh -o PasswordAuthentication=no myhost 'drush --invoke --debug [notice]
--root=/var/www/current/drupal-cms/ --uri=www.myhost.com --verbose 2>&1' 2>&1 [0.16 sec, 5.28 MB]
irb(main):002:0> expression = /(?:OUT[=]*)/
=> /(?:OUT[=]*)/
irb(main):003:0> "OUT".match(expression)
=> #<MatchData "OUT">
irb(main):004:0> "OUT=".match(expression)
=> #<MatchData "OUT=">
irb(main):005:0> "Quark".match(expression)
=> nil
"SYSLOGPROG": [
[
"Shorewall"
]
],
"program": [
[
"Shorewall"
]
],
@bascht
bascht / xmas.rb
Created December 24, 2014 15:35
Xmas Song
require 'socket'
begin
PAYLOAD=open("xmas.txt").read
SONG=open('silent.txt').read
rescue Exception => e
puts "Burp: #{e}"
exit(-1)
end
@bascht
bascht / helm-fuzzy.el
Created November 26, 2014 21:02
helm-fuzzy.el
(helm :sources (helm-build-sync-source "test"
:candidates '("foo" "foo bar" "foo bar foo" "foo bar foo bar" "bar" "baz")
:fuzzy-match t
)
:buffer "*helm test*")
@bascht
bascht / binichonline.py
Created November 20, 2014 12:25
Check if I am online. Useful for wonky interwebs like 3/4G or crappy office NAT…
#!/usr/bin/env python
# encoding:utf-8
import os
import subprocess
from time import sleep
import curses
PING = ["ping", "-q", "-c1", "8.8.8.8"]
@bascht
bascht / pinget.rb
Last active September 24, 2024 14:42
Download all a RSS feed and wget all the links for your personal offline reading pleasure. :)
#!/usr/bin/env ruby
# - encoding: utf-8 -
#
# E.g. with: pinget.rb https://feeds.pinboard.in/rss/secret:YOURSECRET/u:YOURUSERNAME/toread/
require 'rss'
require 'open-uri'
require 'uri'
WGET = ['wget',