This file contains hidden or 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
LokingMac:~ josue$ diskutil list | |
/dev/disk0 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: GUID_partition_scheme *121.3 GB disk0 | |
1: EFI EFI 209.7 MB disk0s1 | |
2: Apple_HFS Macintosh HD 121.0 GB disk0s2 | |
/dev/disk1 | |
#: TYPE NAME SIZE IDENTIFIER | |
0: FDisk_partition_scheme *1.0 TB disk1 | |
1: Windows_NTFS TOSHIBA 786.4 GB disk1s1 |
This file contains hidden or 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
{ | |
"query":{ | |
"count":111, | |
"created":"2014-08-15T09:48:41Z", | |
"lang":"en-US", | |
"diagnostics":{ | |
"publiclyCallable":"true", | |
"user-time":"5", | |
"service-time":"0", | |
"build-version":"0.2.2666" |
This file contains hidden or 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
import logging | |
import traceback | |
import logging.handlers | |
from logging import Handler, Logger | |
import sqlalchemy | |
from sqlalchemy.sql import func | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String, DateTime |
This file contains hidden or 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
## A simple translation engine in jquery | |
## translation.json looks like | |
{ | |
"your_id" : "text value to translate to" | |
} | |
This file contains hidden or 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
################################################## | |
# | |
# Author : josue | |
# Filename : mylogger.sh | |
# Description : custom logger for my shell scripts | |
# Creation Date : 26-02-2015 | |
# Last Modified : Mon 09 Mar 2015 12:29:41 PM CDT | |
# | |
################################################## |
This file contains hidden or 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
json_data.keys().each do | key | | |
new_json_data[key] = json_data[key] unless ['sic', 'fihm'].include?(key) and json_data.has_key?(key) | |
end |
This file contains hidden or 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
<?php | |
$query = "SELECT * FROM Radios WHERE radio_id IN (SELECT radio_id FROM radio_category WHERE category_id = 1)"; | |
mysql_query($query); | |
?> |
This file contains hidden or 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
import pdb | |
import sys | |
import cmd | |
import argparse | |
from lokingyql import LokingYQL | |
class ExecuteAction(argparse.Action): | |
def __call__(self, parser, namespace, value, option_string=None): |
This file contains hidden or 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
##################################### | |
# Put that script in your $JENKINS_HOME | |
# Backkup your jobs first : tar czvf $JENKINS_HOME/jobs.tar.gz $JENKINS_HOME/jobs/*/config.xml | |
# then | |
# python disable_scheduled_jobs.py | |
# check the disable_scheduled_jobs.log | |
# If everything seems alright, go on jenkins and perform a "reload config from disk" | |
import os, glob, logging | |
import pdb |
OlderNewer