Skip to content

Instantly share code, notes, and snippets.

Aleksandar Kostadinov akostadinov

Block or report user

Report or block akostadinov

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
@jkullick
jkullick / fdisk-sector-63.md
Last active Dec 29, 2016
Force Sector 63 Boundary in fdisk
View fdisk-sector-63.md
fdisk -c=dos -u=cylinders /dev/sdb

Source

@detiber
detiber / atomic-openshift-installer-config.yml
Last active Aug 30, 2018
openshift-ansible-installer config example
View atomic-openshift-installer-config.yml
---
version: v3
variant: openshift-enterprise
variant_version: '3.1'
# The deployment key specifies the hosts and roles fo rthe deployment
# and configuration values that apply to the deployment as a whole
deployment:
ansible_config: /usr/share/atomic-openshift-utils/ansible.cfg
ansible_log_path: /tmp/ansible.log
@trevorrowe
trevorrowe / client.rb
Created Jun 29, 2015
Ruby Net::HTTP Expect-100 continue PUT bug
View client.rb
require 'net/http'
require 'logger'
req = Net::HTTP::Put.new('/', { 'expect' => '100-continue' })
req.body = 'data'
http = Net::HTTP.new('localhost', 3000)
http.continue_timeout = 1
http.set_debug_output(Logger.new($stdout))
http.request(req)
@kpiwko
kpiwko / scl_sudo
Created May 7, 2015
Red Hat SCL Sudo wrapper
View scl_sudo
#! /bin/sh
# TODO: parse & pass-through sudo options from $@
sudo_options="-E"
scls=$X_SCLS
#available_scls="`scl --list | tr '\n' ' ' | sed 's/ $//'`"
for arg in "$@"
do
case "$arg" in
*\'*)
@jehrhardt
jehrhardt / KeyLengthDetector.java
Created Mar 15, 2013
Detect the allowed size of AES keys on the JVM. If the size is <= 256, it is limited. To fix it JCE unlimted stregth files are needed.
View KeyLengthDetector.java
import javax.crypto.Cipher;
import java.security.NoSuchAlgorithmException;
public class KeyLengthDetector {
public static void main(String[] args) {
int allowedKeyLength = 0;
try {
allowedKeyLength = Cipher.getMaxAllowedKeyLength("AES");
} catch (NoSuchAlgorithmException e) {
@gregretkowski
gregretkowski / logger_trace.rb
Created Oct 11, 2012
Adding 'trace' to ruby Logger
View logger_trace.rb
require 'logger'
# Monkeypatch a 'trace' loglevel into ruby Logger
class Logger
module Severity; TRACE=-1;end
def trace(progname = nil, &block);add(TRACE, nil, progname, &block);end
def trace?; @level <= TRACE; end
end
l = Logger.new(STDERR)
l.level = Logger::TRACE
@phibo23
phibo23 / fb2ical.php
Last active Oct 5, 2015 — forked from cognitom/fb2ical.php
Export ical format for Facebook page's events by cognitom. Modifications: pageId as parameter, restriction to public events, improved timezone adjustment, ignore exceptions
View fb2ical.php
<?php
/*
original code by cogitom: https://gist.github.com/997980/
This script reads future events (plus several days into the past) from Facebook pages
and creates a subscribable iCalendar
Improvements upon the original version:
- fixed start and endtime reading
- timezone adjustment done on facebook's side (more reliable)
@cognitom
cognitom / fb2ical.php
Created May 29, 2011
Export ical format for Facebook page's events
View fb2ical.php
<?php
// https://github.com/facebook/php-sdk/
require_once 'path/to/facebook.php';
// http://www.kigkonsult.se/iCalcreator/
require_once 'path/to/iCalcreator.class.php';
$config = array(
'appId' => 'xxxx',//change to your fb app id
'secret' => 'yyyy',//change to your fb app secret
'pageId' => 'shimokitazawa.osscafe',//change to target fb page id
You can’t perform that action at this time.