Skip to content

Instantly share code, notes, and snippets.

Ljz7

Block or report user

Report or block Ljz7

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 slack_delete.py
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@ChloeTigre
ChloeTigre / regenerate-images.php
Created May 20, 2015
Regenerate images in Prestashop from command line
View regenerate-images.php
<?php
define('_PS_ROOT_DIR_', '/path/to/prestashop/root');
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.'admin_folder');
require(_PS_ADMIN_DIR_.'/../config/config.inc.php');
require(_PS_ADMIN_DIR_.'/functions.php');
class Employee2 extends EmployeeCore
{
public function isSuperAdmin()
@maethor
maethor / debian_upgrade.yml
Created Jul 18, 2014
Ansible playbook to update and upgrade Debian hosts
View debian_upgrade.yml
---
- hosts: all
sudo: yes
tasks:
- name: Update packages list
apt: update_cache=yes
when: ansible_os_family == 'Debian'
- name: List packages to upgrade (1/2)
@todgru
todgru / starttmux.sh
Last active Oct 17, 2019
Start up tmux with custom windows, panes and applications running
View starttmux.sh
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

You can’t perform that action at this time.