This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rpm | |
import yum | |
from operator import itemgetter | |
def colorize(str, col): | |
return "\x1b[%d;1m%s\x1b[0m" % (col, str) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Drop all your images in a folder, let's call it /tmp/wallpapers then run this | |
# Take all your files from the output folder and put them somewhere in your | |
# home folder (like ~/Pictures/Wallpapers) | |
RES=$( xrandr | grep primary | awk '{ print $4 }' | cut -d '+' -f 1 ) | |
mkdir output 2>/dev/null | |
for a in *.{png,jpg,tga}; do | |
for b in *.{png,jpg,tga}; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Ansible setup | |
# We don't want all the pip installs and various dependencies to conflict with | |
# normal yum packages, this solves the issue by creating an ansible virtualenv | |
# and tells ansible to use it | |
### | |
- hosts: all | |
become: true | |
tasks: | |
- name: "Create deployment folder" | |
file: path=/opt/deploy state=directory mode=0755 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCREEN_RES=2560x1440 | |
mkdir result 2>/dev/null || true | |
for a in *.jpg; do for b in *.jpg; do | |
[[ "$a" != "$b" ]] && \ | |
convert \ | |
"$a" -resize "${TARGET_RES}^" -gravity center -crop "${TARGET_RES}+0+0" +repage \ | |
"$b" -resize "${TARGET_RES}^" -gravity center -crop "${TARGET_RES}+0+0" +repage \ | |
+append "result/${a}-${b}"; | |
done; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Type definitions for MAGE 1.0.2 | |
// Project: https://github.com/mage/mage | |
// Definitions by: Christophe Robin <crobin@nekoo.com> | |
/// <reference types="node" /> | |
import events = require('events'); | |
declare namespace mage { | |
interface IMage { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.0" | |
networks: | |
net: | |
driver: overlay | |
traefik: | |
external: | |
name: traefik_net | |
volumes: | |
runner: | |
gitlab: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package alpm | |
// #cgo LDFLAGS: -lalpm | |
// #include <alpm.h> | |
import "C" | |
//import "fmt" | |
import "errors" | |
type ALPM struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: cryptopp/algebra.cpp | |
=================================================================== | |
--- cryptopp/algebra.cpp (revision 5) | |
+++ cryptopp/algebra.cpp (working copy) | |
@@ -58,7 +58,7 @@ | |
Element g[3]={b, a}; | |
unsigned int i0=0, i1=1, i2=2; | |
- while (!Equal(g[i1], this->Identity())) | |
+ while (!this->Equal(g[i1], this->Identity())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var websocket = require('websocket'); | |
var client = new websocket.client(); | |
client.on('connectFailed', function() { console.log(arguments); }); | |
client.on('connect', function(conn) { | |
console.log('connected!'); | |
conn.on('message', function(message) { | |
console.log(message); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First shell | |
docker run --name foobar --rm -t -i ubuntu bash | |
# Another shell | |
# Change URL to docker API, under linux you can quickly expose it: socat -d -d TCP-LISTEN:8080,fork UNIX:/var/run/docker.sock | |
curl -XPOST 'localhost:8080/commit?container=foobar&comment=foo&repo=test/foobar@foo:bar' |
NewerOlder