Skip to content

Instantly share code, notes, and snippets.

Oleksandr Natalenko pfactum

Block or report user

Report or block pfactum

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
View gist:1659428
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
void *worker(void *data);
struct worker_data_t
{
pthread_t thread_id;
View gist:1659702
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
void *worker(void *data);
struct worker_data_t
{
pthread_t thread_id;
View x-wifi-ap-wrapper.sh
#!/usr/bin/env bash
delay="1000"
pid1=`pidof hostapd`
if [[ $pid1 != "" ]]
then
notify-send -t $delay "Зупиняю точку доступу Wi-Fi…"
sudo iptables -t nat -F
sudo iptables -t mangle -F
View flac1.sh
#!/bin/bash
enca -x utf-8 "$1" ; \
shnsplit -o flac "$2" < "$1" && \
rm -f split-track00.flac ; \
cuetag.sh "$1" split*.flac && \
find . -maxdepth 1 -name "split*.flac" -print0 | xargs -0 metaflac --add-replay-gain && \
lltag --yes --no-tagging --rename "%n - %t" split*.flac
View flac2.sh
#!/bin/bash
#By DsTr wink.gif
#`kdialog --passivepopup "Добавление в коллекцию..." 1`
if [ "$1" == '' ]; then
shellDir="$PWD"
else
shellDir="$1"
fi
View 3.3.2-pf..3.3.3.patch
diff --git a/Makefile b/Makefile
index ea38990..fafc8d5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 3
-SUBLEVEL = 2
+SUBLEVEL = 3
EXTRAVERSION = -pf
@pfactum
pfactum / minigal-nano-pf.patch
Created Jul 24, 2012
MiniGal Nano improvements
View minigal-nano-pf.patch
diff -Naur MiniGal Nano 0.3.5/config.php mgnew/config.php
--- MiniGal Nano 0.3.5/config.php 2010-12-06 11:43:00.000000000 +0200
+++ mgnew/config.php 2012-07-22 18:34:10.000000000 +0300
@@ -16,28 +16,28 @@
*/
// EDIT SETTINGS BELOW TO CUSTOMIZE YOUR GALLERY
-$thumbs_pr_page = "28"; //Number of thumbnails on a single page
-$gallery_width = "900px"; //Gallery width. Eg: "500px" or "70%"
+$thumbs_pr_page = "21"; //Number of thumbnails on a single page
@pfactum
pfactum / wordpress-pf.patch
Created Jul 24, 2012
WordPress user restrictions
View wordpress-pf.patch
--- user-edit.php~ 2012-07-24 14:23:21.000000000 +0300
+++ user-edit.php 2012-07-24 14:50:01.000000000 +0300
@@ -278,52 +278,74 @@
<tr>
<th><label for="first_name"><?php _e('First Name') ?></label></th>
- <td><input type="text" name="first_name" id="first_name" value="<?php echo esc_attr($profileuser->first_name) ?>" class="regular-text" /></td>
+ <td>
+ <?php
+ if (!current_user_can('change_first_name'))
@pfactum
pfactum / mgn-improvements-v2.patch
Created Jul 26, 2012
MiniGal Nano improvements, v2
View mgn-improvements-v2.patch
diff -Naur MiniGal Nano 0.3.5/config.php newmg/config.php
--- MiniGal Nano 0.3.5/config.php 2010-12-06 11:43:00.000000000 +0200
+++ newmg/config.php 2012-07-22 18:34:10.000000000 +0300
@@ -16,28 +16,28 @@
*/
// EDIT SETTINGS BELOW TO CUSTOMIZE YOUR GALLERY
-$thumbs_pr_page = "28"; //Number of thumbnails on a single page
-$gallery_width = "900px"; //Gallery width. Eg: "500px" or "70%"
+$thumbs_pr_page = "21"; //Number of thumbnails on a single page
@pfactum
pfactum / mgn-improvements-v3.patch
Created Jul 26, 2012
MiniGal Nano improvements, v3
View mgn-improvements-v3.patch
diff -Naur MiniGal Nano 0.3.5/config.php newmg/config.php
--- MiniGal Nano 0.3.5/config.php 2010-12-06 11:43:00.000000000 +0200
+++ newmg/config.php 2012-07-22 18:34:10.000000000 +0300
@@ -16,28 +16,28 @@
*/
// EDIT SETTINGS BELOW TO CUSTOMIZE YOUR GALLERY
-$thumbs_pr_page = "28"; //Number of thumbnails on a single page
-$gallery_width = "900px"; //Gallery width. Eg: "500px" or "70%"
+$thumbs_pr_page = "21"; //Number of thumbnails on a single page
You can’t perform that action at this time.